简体   繁体   English

链接Boost给我错误

[英]Linking Boost gives me error

When trying to compile my solution with VS2010 I'm getting a compiler error: 尝试使用VS2010编译解决方案时,出现编译器错误:
"error LNK1104: cannot open file 'libboost_unit_test_framework-vc100-mt-gd-1_45.lib'" “错误LNK1104:无法打开文件'libboost_unit_test_framework-vc100-mt-gd-1_45.lib'”
I've tried to look for this file on hard drive but with no luck. 我试图在硬盘上查找此文件,但是没有运气。
Why am I getting this error and how can I fix it? 为什么会出现此错误,我该如何解决?

you need to take precompiled Boost libraries for your system, eg from boostpro.com or build Boost yourself. 您需要为系统准备预编译的Boost库,例如从boostpro.com或自己构建Boost。 Then add a path to Boost .lib's to your Linker paths 然后将Boost.lib的路径添加到链接器路径

Some Boost libraries require building. 一些Boost库需要构建。 As robin hood's answer notes, you can download an install with the binaries included, or you can build them yourself (which is slightly fiddly). 作为Robin Hood的答案,您可以下载包含二进制文件的安装,也可以自己构建(有点麻烦)。 See http://www.boost.org/doc/libs/1_45_0/more/getting_started/windows.html for an extensive discussion. 有关广泛的讨论,请参见http://www.boost.org/doc/libs/1_45_0/more/getting_started/windows.html

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

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