Ryan Mansfield(deleted)
|
Re: How to link a project against static libraries?
|
Ryan Mansfield(deleted)
10/14/2008 9:18 AM
post14944
|
Re: How to link a project against static libraries?
Elena Laskavaia wrote:
> If you talking about IDE for QNX project open project->properties on app. Switch to Linker tab. In drop down menu
select "Extra libraries". Add you library there.
> I don't know answer to a second question (it could be in gcc doc).
The linker option to link in a whole archive is:
-Wl,--whole-archive <list of libs> -Wl,--no-whole-archive
By default, the GNU linker brings in the entire referenced object, and
doesn't do it on a per-function basis. To accomplish that, you would
need to compile with -ffunction-sections and link with -Wl,--gc-sections.
Regards,
Ryan Mansfield
|
|
|