Elena Laskavaia
|
RE: Link with static lib - Executable is not rebuilt
|
Elena Laskavaia
05/17/2011 11:01 AM
post85787
|
RE: Link with static lib - Executable is not rebuilt
How did you add referene to project? There is page in C/C++ General -
Path and Symbols
and it has tab References project - that should be used insead of top
level one
-----Original Message-----
From: Gregoire Banderet [mailto:community-noreply@qnx.com]
Sent: Tuesday, May 17, 2011 8:20 AM
To: momentics-community
Subject: Link with static lib - Executable is not rebuilt
Hello,
I use Momentics and C/C++ project.
project 'L' genrates a static lib; libL.a Then I have project 'E' which
is an executable, 'E' links with libL.a.
The problem is that when I modify a CPP file inside 'L', and click on
Build for project 'E', the E executable is not recreated.
The libL.a is regenerated, because the project E references project L.
But Momenetics does not rebuild E executable.
Is it a bug?
I do link E with libL.a by adding 1 line in the Additional object Files
panel in project E properties. (see attachment) Is it the right way to
link with a static lib?
Thank you for your help,
Greg
_______________________________________________
QNX Momentics Community Support
http://community.qnx.com/sf/go/post85763
|
|
|
Christian Damus(deleted)
|
Re: Link with static lib - Executable is not rebuilt
|
Christian Damus(deleted)
05/17/2011 11:39 AM
post85792
|
Re: Link with static lib - Executable is not rebuilt
Hi, Greg,
This is a problem in the Internal Builder's dependency management:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=210248
To work around this, you can change your executable project to use the external builder, which generates makefiles
having the correct dependency rules and invokes make on them:
- in the Project Properties, navigate to the "C/C++ Build -> Toolchain Editor" page
- change the "Current Builder" selection to "Gnu Make Builder"
Note also that you can generalize the library search path in your settings by using the ${ConfigName} variable in the
path to ensure that your Executable project build uses the matching configuration of the library project. e.g.,
${WorkspaceDirPath}/Libs/YAPI/Prj/QNX/${ConfigName}
and you can add static libraries by libname to the "Libraries" list as you would for shared libraries, instead of the
Additional Object Files list.
HTH,
Christian
On 2011-05-17, at 8:20 AM, Gregoire Banderet wrote:
> Hello,
>
> I use Momentics and C/C++ project.
> project 'L' genrates a static lib; libL.a
> Then I have project 'E' which is an executable, 'E' links with libL.a.
>
> The problem is that when I modify a CPP file inside 'L', and click on Build for project 'E', the E executable is not
recreated.
> The libL.a is regenerated, because the project E references project L. But Momenetics does not rebuild E executable.
> Is it a bug?
>
> I do link E with libL.a by adding 1 line in the Additional object Files panel in project E properties. (see
attachment)
> Is it the right way to link with a static lib?
>
> Thank you for your help,
> Greg
>
>
>
> _______________________________________________
>
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post85763
> <Properties.png>
----
Christian W. Damus
Software Developer, IDE Team
QNX Software Systems <http://www.qnx.com/>
|
|
|