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

浪子不回头ぞ 提交于 2019-11-27 23:45:42
Ben

I found the answer to my question and the solution to my problem in TheArtTrooper's answer to this thread:

How do I build boost with new Visual Studio 2013 preview?

The linker does know which library to use, because it is specified in boost/config/auto_link.hpp.

This file is missing a few lines of code to handle the vc120 version:

#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1800)

     // vc11:
#    define BOOST_LIB_TOOLSET "vc110"

#  elif defined(BOOST_MSVC)

     // vc12:
#    define BOOST_LIB_TOOLSET "vc120"

Now it compiles and links just fine!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!