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

前端 未结 1 1913
你的背包
你的背包 2020-12-06 11:40

I\'m trying to migrate a project written in VS2012 to VS2013.

I successfully compiled boost 1.53.0 (I first tried 1.54.0, but got some compiler errors) and got libra

相关标签:
1条回答
  • 2020-12-06 11:57

    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!

    0 讨论(0)
提交回复
热议问题