Boost logo

Boost Users :

Subject: Re: [Boost-users] dynamically linked libraries looking for static libraries which don't exist
From: John Maddock (boost.regex_at_[hidden])
Date: 2011-08-18 12:56:38


> I've built debug binaries of boost 1.47.0 on Windows with MSVC 10 using
> the following options
>
> b2.exe variant=debug link=shared threading=multi runtime-link=shared
>
> which as far as I understand should build dynamically linked libraries
> (which it does, I get a bunch of .lib files & .dll files as expected).
> However when I try to link some projects in Visual Studio 2010 which
> import boost_filesystem-vc100-mt-gd-1_47.lib &
> boost_system-vc100-mt-gd-1_47.lib I get the following errors
>
> 1>LINK : fatal error LNK1104: cannot open file
> 'libboost_filesystem-vc100-mt-gd-1_47.lib'
> &
> 1>LINK : fatal error LNK1104: cannot open file
> 'libboost_system-vc100-mt-gd-1_47.lib'
>
> I can stop these errors by using the /NODEFAULTLIB option on both those
> libraries but I would like to stop them in the first instance. Does anyone
> have any ideas why the libraries which should be dynamically linked are
> looking for statically linked libraries which don't exist?

Boost will auto-magically link to static lib builds by default, set the
define BOOST_ALL_DYN_LINK to force linking to the dll's.

HTH, John.


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