gnu.g++.help
[Top] [All Lists]

Re: Running initial code when in library

Subject: Re: Running initial code when in library
From: "Paulo Matos"
Date: 24 May 2006 12:43:53 -0700
Newsgroups: gnu.g++.help
Paul Pluzhnikov wrote:
> > I have no other solution than using --whole-archive to linker right now,
>
> You do have other solutions, e.g. explicitly list objects that must
> be linked in, and the linker will do the right thing (pulling in
> only necessary parts of the libraries).
>

Unfortunately using --whole-archive doesn't seem viable right now since
autotools don't allow positioned ldflags which means that when I add
--whole-archive I really don't know how it will be positioned within
other arguments. Right now it's in the beginning which will include
_all_ of the archives and results in error for some reason I don't
know. Still, including all archives is not ok.

Again, although I may have to all this stuff automatically it is very
wierd that this is not an automated process. Isn't this a normal
problem: an interface with some libraries using the interface. The core
creates and destroys the object of the libraries through the interface.
Obviously there is no reference from the core to the object files of
the libraries. No reference from the interface to anything in the
library... This seems a normal issue which turns out to be a nightmare
to solve. :-/

> Cheers,
> --
> In order to understand recursion you must first understand recursion.
> Remove /-nsp/ for email.


<Prev in Thread] Current Thread [Next in Thread>