Re: [boost] [serialization] serialization/nvp.hppmakes autolink kickin

----- Mensaje original ----- De: Robert Ramey <ramey@rrsd.com> 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

JOAQUIN LOPEZ MU?Z wrote:
----- Mensaje original ----- De: Robert Ramey <ramey@rrsd.com> 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.
OK - I can probably do this. I considered at doing this with bjam. But I couldn't figure out how to keep the boost library directory outside the reach of bjam or what ever - its probably easy once one figures it out.
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.
Hmmm - I wasn't aware that all linkers complain on duplicate symbols rather than just loading missing ones.
Joaquín M López Muñoz Telefónica, Investigacion y Desarrollo
participants (2)
-
JOAQUIN LOPEZ MU?Z
-
Robert Ramey