Visual Studio 2013 (vs120) asks for wrong boost li

2020-02-10 13:01发布

I'm trying to compile one of my projects on Windows 7, using Visual Studio 2013. I've installed Boost 1.53 and setup the solution using cmake.

What happens is that now the compiled libraries of boost are in the form libboost_*-vc120-mt(-gd)-1_53.lib. In the linker project options, under the input tab, I have verified that the libraries that I need are there, and in fact the compiler is able to correctly read them.

However, for some reason that I absolutely can't understand, the linker is also trying to find libraries compiled as vc110. For example:

error LNK1104: cannot open file 'libboost_filesystem-vc110-mt-gd-1_53.lib'

The Platform Toolset that is listed in the project option is "Visual Studio 2013 (v120)". I couldn't find any reference to vc110 in any of the project options. Can you help me understand what is happening?

3条回答
走好不送
2楼-- · 2020-02-10 13:39

This post thankfully solves my question. I wasn't able to find it before. The solution is to edit the boost/config/auto_link.hpp because the code inside is not able to handle vc120, and ends up suggesting vc110

How do I specify, which version of boost library to link to?

查看更多
啃猪蹄的小仙女
3楼-- · 2020-02-10 13:50

Instead of patching the config file try just defining a macro before the header inclusion .. this is what I did in my project

//#define BOOST_LIB_TOOLSET "vc100" //#include

查看更多
等我变得足够好
4楼-- · 2020-02-10 14:01

The library name is autogenerated in the boost header version.hpp

Possibly the version wasn't rebuilt, or you are pointing at the wrong header version?

查看更多
登录 后发表回答