[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Convenieve libraries and applications.

From: Carlo Wood
Subject: Convenieve libraries and applications.
Date: Thu, 12 Aug 2004 02:17:56 +0200
User-agent: Mutt/1.4.1i

I have a normal application (not a shared library thus) which
uses convenience libraries in subdirectories.

This application also uses libltdl - in order to load modules.
These modules needs to resolve symbols from the application,
symbols that are in fact in the convenience libraries.

The application itself doesn't use these symbols.
As a result - the symbols are not put into the application!
And loading the modules fails (or at least, calling the
missing functions fails).

What is needed here is obvious: I need to link the application
with the --whole-archive/--no-whole-archive linker flags
around the convenience libraries.

But, libtool doesn't let me do that :/
It doesn't add it by itself, because I am not building a shared
library but an application (using stuff like "-dlopen" self
also doesn't help).  And when I add the flags myself, like:
myapp_LDFLAGS = -Wl,--whole-archive utils/ -Wl,--no-whole-archive
then libtool rearranges the flags so that they come out as:
-Wl,--whole-archive -Wl,--no-whole-archive obj1.o obj2.o ... utils/
and that doesn't do what I want.  When I only use -Wl,--whole-archive
and leave the -Wl,--no-whole-archive then something horrible gets wrong
that simply is not an option.

Can someone help me out please?

Carlo Wood <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]