When trying to include '#include <boost/regex.hpp>' I get: 1>LINK : fatal error LNK1104: cannot open file 'libboost_regex-vc100-mt-gd-1_39.lib'

风格不统一 提交于 2019-12-23 10:58:25

问题


Not sure why i get that, I downloaded libs from here and while I have a lib called 'libboost_regex-vc90-mt-gd-1_39.lib I don't have one which is called 'libboost_regex-vc100-mt-gd-1_39.lib', renaming the one with vc90 to vc100 works but I'm not sure if this is the ideal solution?

#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;
}

回答1:


You are probably using Visual Studio 2010 (this is where vc100 comes from), but the downloaded lib was built with 2008 (vc9)

Visual Studio 2010 comes with TR1, include <regex> and enjoy.



来源:https://stackoverflow.com/questions/1738089/when-trying-to-include-include-boost-regex-hpp-i-get-1link-fatal-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!