Boost logo

Boost Users :

From: John Pye (john.pye_at_[hidden])
Date: 2007-08-28 21:35:59


Hi all,

I am having trouble linking against Boost DLLs. Even though I think I am
using the correct compiler commands, I seem to end up with statically
linked binaries (everything works fine, but Dependency Walker shows that
I have no DLL dependency on Boost). Specifically, I am trying to link
against Boost:Serialization.

Because I'm using MinGW, my Boost libraries had to be compiled by me, so
I used "bjam --toolset=gcc --layout=system". I then ran "bjam install"
with the same options, which resulted in (over 1GB of) files in c:\Boost.

Next I build my own program. It compiles against the Boost files using
GCC parameters "-IC:\Boost\include" and then links against
Boost::Serialisation using

"-LC:\Boost\lib" -lboost_serialization-mt

So, what can I do to set GCC to use dynamic linking to the DLL in this
case, instead of the static linking that it appears to be using at the
moment?

(I am a little unclear about the purpose of the .a files currently
present in the c:\Boost\lib directory. Do they refer in some way to the
DLLs or are they self-contained static libraries?)

Cheers
JP


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net