C++ 的问题VC中Boost安装(找不到文件) 2010年
我使用 http://www.boostpro.com/download/。然后我创建了一个 VC++ 非托管命令行项目。我添加了 #include
行,如 Boost 入门 教程中所述,并且我还将 Boost 安装目录放入链接选项中。当我现在编译时,VS2010报告一个致命错误LNK1104:文件“libboost_regex-vc100-mt-gd-1_44.lib”无法打开
。我检查了安装目录,只有文件 libboost_regex-vc100-mt-s-1_44.lib
(注意 -gd-
与 -s-
>)。谁能告诉我问题是什么以及如何解决它?谢谢!
I freshly installed Boost 1.44 with the latest available installer from http://www.boostpro.com/download/. Then I created a VC++ unmanaged commandline project. I added the line #include <boost/regex.hpp>
as stated in the Boost Getting Started tutorial, and I also put the Boost installation directory into the linking options. When I compile now, VS2010 reports a fatal error LNK1104: file "libboost_regex-vc100-mt-gd-1_44.lib" cannot be opened
. I checked the installation directory and there's only the file libboost_regex-vc100-mt-s-1_44.lib
(note -gd-
vs -s-
). Can anyone tell me what the problem is and how I can solve it? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
入门中列出了 Boost 库命名约定页面。
mt
表示已启用多线程g
表示已链接的 CRT 库的调试版本d
表示您正在链接的 boost 库本身的版本为调试版本s
表示 CRT 库已被 boost 库静态链接。可能发生的情况是您没有让 BoostPro 安装程序下载缺少的版本。
The Boost library naming convention is listed on the Getting Started page.
mt
indicates multithreading is enabledg
indicates debug versions of the CRT libraries were linkedd
indicates the version of the boost libraries themselves that you're linking to are debug versionss
indicates that the CRT libraries have been statically linked to by the boost librariesWhat is probably happening is that you didn't get the BoostPro installer to download the missing flavors.
Visual Studio 2010 为您提供了 C++0x 标头
。Visual Studio 2010 provides the C++0x header
<regex>
for you.