简体   繁体   English

将C ++项目升级到VS2015,但链接器仍在寻找VC100 Boost库

[英]Upgraded C++ Project to VS2015, but the Linker is still looking for VC100 Boost library

I have upgraded my C++ project from VS2008 to VS2015. 我已经将C ++项目从VS2008升级到VS2015。
The Platform Toolset is set to Visual Studio 2015 (v140) . Platform Toolset设置为Visual Studio 2015 (v140) If it matters, the Target Platform Version is set to 8.1 . 如果重要,则将Target Platform Version设置为8.1

I built boost using toolset=msvc-14.0 and put the built libraries into the place my project is expecting them. 我使用toolset=msvc-14.0构建了boost,并将构建的库放到我的项目期望的位置。

When I build my project, I get a linker error: 构建项目时,出现链接器错误:

LNK1104 cannot open file 'libboost_thread-vc100-mt-1_43.lib'

Why is it looking for the vc100 library and not the vc140 one? 为什么它寻找vc100库,而不是vc140一个?


  1. It's the first project out of 2 that is failing. 这是失败的2个项目中的第一个。
  2. In the .vcproj file there is no reference that I can see to vc100 . .vcproj文件中,没有对vc100

Linking to boost libraries on Windows is done automatically through auto linking and #pragma directives. 通过自动链接和#pragma指令,可以自动完成Windows上Boost库的链接。 The version number it looks to link against is defined in boost\\config\\auto_link.hpp where it goes through a bunch of #if and #elif s on your MSVC version and if the version is higher than any of the ones it knows about then it just sets the version number to the highest one it knows about. 它看起来要链接的版本号是在boost \\ config \\ auto_link.hpp中定义的,该版本号在您的MSVC版本上经过一堆#if#elif ,并且该版本是否高于其所知道的版本号它只是将版本号设置为它知道的最高版本号。 For boost 1.57 that is vc140, for your version of boost that is presumably vc100. 对于Boost 1.57,即vc140,对于您的Boost版本,可能是vc100。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM