Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: How to add lib directories to search path using -L
Topic Summary:
Created On: 27-Sep-2006 15:29
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 27-Sep-2006 15:29
User is offline View Users Profile Print this message


Shawn Adams

Posts: 3
Joined: 15-May-2006

I'm using the makefiles generated by Rhapsody to build my code. I'm using the gcc compiler. I need to link several libraries to an executable that I'm building and I would like to add several library directories to the search path the linker uses when searching for the libraries. I believe I need to add the directories using the -L option but I can't figure out how to add this option or the directories in my Rhapsody project. Anyone have any ideas?
Report this to a Moderator Report this to a Moderator
 28-Sep-2006 07:45
User is offline View Users Profile Print this message


Jesper Gissel

Posts: 88
Joined: 20-Jul-2005

You have to specify the entire path (absolute or relative to your output dir), if you would use the Component or Configuration feature dialogs.

Another way is to add the -L<path> expression to the <lang>_CP::<Environment>::MakeFileContent property to the "LINK_FLAGS" macro.

We use gcc too and in our setup we do something like this:

In the bat file specified under <lang>_CP::<Environment>::InvokeMake property we set an environment variable, OPT_LC:
[CODE] set OPT_LC= -L../../../eCosBoard/eCos_install/lib[/CODE]The OPT_LC environment variable is then used in the <lang>_CP::<Environment>::MakeFileContent property:
[CODE]LINK_FLAGS= $(OPT_LC) $OMConfigurationLinkSwitches[/CODE]

-------------------------
Jesper Gissel
Johnson Controls Denmark, Marine Controls
Report this to a Moderator Report this to a Moderator
 28-Sep-2006 08:00
User is offline View Users Profile Print this message


Simon Morrish

Posts: 127
Joined: 17-May-2005

Hi Shawn

I agree with Jesper's suggestions, and would like to add another:

If you wish to avoid editing the make file template or batch files, you can add your -L<path> expressions to one of the following properties:

[list]
[*]<lang>_CPP::<Env>::LinkDebug (for debug builds only)
[*]<lang>_CPP::<Env>::LinkRelease (for release builds only)
[*]<lang>_CPP::<Env>::LinkSwitches (for any build)
[/list]

The last of these is available in the configuration features dialogue, at the bottom of the Settings tab. Alternatively, you can apply any of these to components or configurations, via their Properties tabs.

best regards,
Simon

-------------------------
Simon Morrish
simon.morrish@eu.panasonic.com
http://panasonic.co.uk
Panasonic ideas for life
Report this to a Moderator Report this to a Moderator
 28-Sep-2006 08:46
User is offline View Users Profile Print this message


Ian Turner

Posts: 25
Joined: 3-Feb-2006

Hi Shawn,

this is like the copy/paste in Windows, you can do it several ways

You could also place a comma separated list of the libraries and their full pathnames in either:

1. the Libraries field of the General tab of the Component features dialog.

2. the Libraries field of the Setting tab of the Configuration features dialog.

The second list will preceed the first in the generated makefile.

This option is probably best with only one or two libraries.

Regards, Ian
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 0 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.