Boost logo

Boost :

From: Edward Diener (eddielee_at_[hidden])
Date: 2005-05-28 17:53:08

Robert Ramey wrote:
> Just in case anyone's interested:
> I've been struggling to reconcile the problem whereby including a header
> from boost/serialization/* provokes the autolinking code to request that one
> of the serialization libraries be included in the link.
> The problem is that this library is requested even though there are no
> pending undefined symbols. So what works fine without autolinking - no
> missng symbols so the serialization*.lib is not needed fails with
> autolinking where the library is requested even though it contains no
> undefined symbols. This shouldn't add any code but it is a pain in the neck
> to require a library when it is really not needed.
> I'm still working on this - but it turns out harder than it looks for
> reasons that are too tedious to go into here.

I do not know your exact case in your code but the idea, of which you
may be aware, is to only include the #pragmas which provide autolinking
in a header file which is going to necessitate linking in a shared
library. I know this is sometimes difficult to do when a header file
includes code, some of which when used will necessitate linking in a
shared library while other of which do not. But the general idea,
sometimes not easily doable, is to segregate code into separate header
files when that is the case.

However I admit I do not know specifically where auto-linking is
implemented in Boost, and I could not find specific documentation about
Boost auto-linking in my 1.32 installation ( I am sure it is there
somewhere ).

Anyway, having used #pragmas to auto-link a number of my own non-Boost
implementations, I thought I would at least chime in about what I know
in the hopes of offering some help on the subject matter.

Boost list run by bdawes at, gregod at, cpdaniel at, john at