Re: [Boost-users] Can't statically link demo program with Boost.Serialization 1.33
On Wed, 1 Mar 2006, Robert Ramey wrote:
I'm not an expert in gcc command line switches. But it seems odd to me that you don't have to specify the full library name with the -L switch. There are several verasions of the library built and I don't see how the proper one can be select without explicitly specifying it. gcc doesn't implemant autolink as far as I know.
I traced the linker (ld) and it autolinks against the dynamic libraries when I dont specify -static on the command line and against the static libraries (libboost_serialization.a) when I do specify -static, which is what I intended. If I specify the name of the library on the command line, as you suggest, this doesn't solve the problem (same results). Therefore, an incorrect library selection doesn't seem to be the problem by the linker. Thank you.
Robert Ramey
Hello,
I am having difficulties statically compiling the demo program at http://www.boost.org/libs/serialization/example/demo.cpp on Linux (Linux 2.6.15-1.1831_FC4 #1 SMP Tue Feb 7 13:37:59 EST 2006 x86_64 GNU/Linux) with gcc version 4.0.2 20051125.
[snip]
Fabrizio
participants (1)
-
Demos Rali