sfl-andreas sfl-andreas - 1 month ago 10
C++ Question

LNK1104 cannot open file libboost_random-vc140-mt-1_61.lib and others

I can't find any text reference to libboost_random-vc140-mt-1_61.lib in any project file or source file, yet Visual Studio 2015 really seems to need it. If I rename another static library libboost_random-vc140-mt-1_61.lib, the linker completes(not pulling any symbols from the bogus boost library). I had used b2.exe at some point in the past to generate such a file, but recently have mounted a Visual Studio project for boost system and random, where the static library outputs have different names. Where are these old references coming from?

Answer

Since you're on Windows, this is likely to be the result of the auto-linking functionality of Boost.

More details are in boost/config/auto_link.hpp.

You can disable this by defining BOOST_ALL_NO_LIB.