libboost_system-vc110-XXXX_54.lib: Why can't I use the static boost library?
Hello everybody, I try to use the boost libraries libboost_filesystem.lib and libboost_system.lib, both version 54, in a project about image processing using the Xbox kinect sensor. I want to use the prebuild windows binaries from the following link: http://sourceforge.net/projects/boost/files/boost-binaries/ 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
2015-11-17 14:42 GMT+03:00 Andreas Kopeinig
Hello everybody,
I try to use the boost libraries libboost_filesystem.lib and libboost_system.lib, both version 54, in a project about image processing using the Xbox kinect sensor. I want to use the prebuild windows binaries from the following link: http://sourceforge.net/projects/boost/files/boost-binaries/
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. HTH.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Best Regards, Sergei Nikulov
-----Original Message----- From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Sergei Nikulov Sent: 17 November 2015 13:44 To: boost-users@lists.boost.org Subject: Re: [Boost-users] libboost_system-vc110-XXXX_54.lib: Why can't I use the static boost
library?
2015-11-17 14:42 GMT+03:00 Andreas Kopeinig
: Hello everybody,
I try to use the boost libraries libboost_filesystem.lib and libboost_system.lib, both version 54, in a project about image processing using the Xbox kinect sensor. I want to use the prebuild windows binaries from the following link: http://sourceforge.net/projects/boost/files/boost-binaries/
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.
Your library files should include an -s in the name, for example libboost_system-vc110-mt-sgd-1.lib. You will need to build these inlcuding "link=static" in the b2 build line. (And you should always try to use the most recent version of both MSVC and of Boost - both are well out of date). Careful RTFM will inform (though static strangely seems to be regarded as an abnormal option). HTH too.
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.
Thank you all very much, I really appreciate your help and your fast answers. I just managed to get my stuff working, although I still don't know for sure what caused this error. I just set up the project again and included my libraries and suddenly it was working. Maybe there were just some problems with my previous visual studio solution file. Nevertheless thank you very much. Cheers Andy :-) On 17.11.15 18:57, John Maddock wrote:
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 mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users .
participants (4)
-
Andreas Kopeinig
-
John Maddock
-
Paul A. Bristow
-
Sergei Nikulov