Boost logo

Boost Users :

Subject: Re: [Boost-users] libboost_system-vc110-XXXX_54.lib: Why can't I use the static boost library?
From: John Maddock (jz.maddock_at_[hidden])
Date: 2015-11-17 12:57:38


>> I referenced the static libs correctly in visual studio in the project
>> properties under "Linker->General->Additional Library Directories" and
>> "Linker->Input->Additional Dependencies" and I also set the path to the
>> headers under "C/C++ -> General-> Additional Include Directories". But
>> when I want to build my code, I get the following linker error: "
>> LNK1181: cannot open file 'libboost_system.obj' ". Why is this
>> happening? Is this object file missing in the archive? If yes, why?
>>
>> In particular I want to use libboost_filesystem-vc110-mt-1_54.lib,
>> libboost_filesystem-vc110-mt-gd-1_54.lib,
>> libboost_system-vc110-mt-1_54.lib and libboost_system-vc110-mt-gd-1.lib
>>
>> Thank you very much,
>> Andy
>>
> Define the preprocessor symbol BOOST_ALL_NO_LIB in your project.

Woh, just hold on there a moment, that's a big sledgehammer, and unless
you really know what you're doing, it'll allow you to shoot yourself in
the foot, head and behind all at the same time ;)

I assume 'libboost_system.obj' is a typo, and should be
'libboost_system.lib'. That would seem to indicate that you have
-DBOOST_AUTO_LINK_NOMANGLE set on the command line - if you remove that
then you should be good to go.

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