c++ - 尝试包含 '#include <boost/regex.hpp>' 时,我得到 : 1>LINK : fatal error LNK1104: cannot open file 'libboost_regex-vc100-mt-gd-1_39.lib'

标签 c++ boost linker boost-regex

不知道为什么会这样,我从 here 下载了库虽然我有一个名为“libboost_regex-vc90-mt-gd-1_39.lib”的库,但我没有一个名为“libboost_regex-vc100-mt-gd-1_39.lib”的库,将 vc90 重命名为 vc100 就可以了但我不确定这是否是理想的解决方案?

#include "stdafx.h"
#include <regex>
#include <boost/array.hpp>
#include <boost/regex.hpp>
#define BOOST_ALL_NO_LIB 

int _tmain(int argc, _TCHAR* argv[])
{
  boost::array<int, 10> a;
  boost::smatch s;

  getchar();
    return 0;
}

最佳答案

您可能使用的是 Visual Studio 2010(这是 vc100 的来源),但下载的库是使用 2008 (vc9) 构建的

Visual Studio 2010 附带 TR1,包括 <regex>并享受。

关于c++ - 尝试包含 '#include <boost/regex.hpp>' 时,我得到 : 1>LINK : fatal error LNK1104: cannot open file 'libboost_regex-vc100-mt-gd-1_39.lib' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1738089/

相关文章:

c++ - main() 的激活记录

c++ - 连接 Leap Motion SDK 和 Cmake

c++ - Boost Spirit消除了简单加法运算符的左递归

c++ - 使用 VC++ 2008 编译 Windows 窗体应用程序时出现 LNK2001 错误

ios - 链接器错误 : undefined symbols, 未找到符号

c++ - 获取插入点的窗口坐标 - Cocoa

c++ - 适合在函数参数中将字符串文字转换为 char * 吗?

c++ - 强制 cmake 使用旧的 bo​​ost 库

c++ - 紧凑的偏移指针,现有的实现?

c++ - ld.exe 找不到-lGL