Boost logo

Boost :

From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2006-02-11 13:49:25


----- Mensaje original -----
De: Robert Ramey <ramey_at_[hidden]>
Fecha: Sábado, Febrero 11, 2006 6:34 pm
Asunto: Re: [boost] [serialization] serialization/nvp.hppmakes
        autolink kickin

> Joaquin:
>
> How do you detect this?

Because the linker fails to find the serialization
library, which I explicitly maintain out of reach
from the IDE.

> would like to add a small test to verify
> that
> header
> inclusion doesn't miss anything - thats easy - just compile. But its
> not clear to me how to verify that its not including too much - ie
> autolinking.
>
> If I make a run test and I accidently invoke autolinking, my bjam
> setupfinds the library and automatically links them in and the
> test passes.
> That's
> the beauty (and curse) of autolink. Turning off autolink will
> just hide the
> problem. I'm sure there is realy dumb simple way to do this - it just
> doesn't occur to me.

Maybe the following:

#include <boost/serialization/nvp.hpp>
// rest of serialization headers which must not trigger autolink
#include <...>

int some_function_already present_in_serialization()
{
}

int main(){}

So, if autolink kicks in, the linker will complain about
a duplicate symbol.

Joaquín M López Muñoz
Telefónica, Investigacion y Desarrollo


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk