如何解决VS 2015上的LNK 2019增强误差 [英] How to solve LNK 2019 boost error on VS 2015

查看:58
本文介绍了如何解决VS 2015上的LNK 2019增强误差的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS 2010上看到了配置boost的指南:如何在Visual Studio 2010中使用Boost。 [ ^ ]

我完全做了什么是wrriten(在64位上),但在(4)中更改为

I saw this guide for configuring boost on VS 2010: How to use Boost in Visual Studio 2010.[^]
I did exactly what was wrriten (on 64 bit), but changed in (4) to

toolset=msvc-14.0

比我尝试从boost开始构建这个程序web:



than I tried building this program from boost getting started web:

#include "stdafx.h"          
#include <boost/regex.hpp>
#include <iostream>
#include <string>

int main()
{
std::string line;
boost::regex pat( "^Subject: (Re: |Aw: )*(.*)" );

while (std::cin)
{
    std::getline(std::cin, line);
    boost::smatch matches;
    if (boost::regex_match(line, matches, pat))
        std::cout << matches[2] << std::endl;
}
}





但收到错误:

严重性代码说明项目文件行错误LNK2019未解析的外部符号private:class boost :: basic_regex>>& __thiscall boost :: basic_regex>> :: do_assign(char const *,char const *,unsigned int)(?do_assign @ ?$ basic_regex @ DU?$ regex_traits @ DV?$ w32_regex_traits @ D @ boost @@@ boost @@@ boost @@ AAEAAV12 @ PBD0I @ Z)在函数public:class boost :: basic_regex>>& __thiscall boost :: basic_regex>> :: assign(char const *,char const *,unsigned int)(?assign @?$ basic_regex @ DU?$ regex_traits @ DV?$ w32_regex_traits @ D @ boost @@@ boost @@@ boost @@ QAEAAV12 @ PBD0I @ Z)BoostTest C:\ Users\shauzer\Documents\Visual Studio 2015 \Projects\BoostTest \ BoostTest \ BoostTest.obj 1



我试图谷歌它,但还没有发现可以解决这个问题的东西。我怎么解决这个问题?



but got the error:
Severity Code Description Project File Line Error LNK2019 unresolved external symbol "private: class boost::basic_regex > > & __thiscall boost::basic_regex > >::do_assign(char const *,char const *,unsigned int)" (?do_assign@?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@AAEAAV12@PBD0I@Z) referenced in function "public: class boost::basic_regex > > & __thiscall boost::basic_regex > >::assign(char const *,char const *,unsigned int)" (?assign@?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@QAEAAV12@PBD0I@Z) BoostTest C:\Users\shauzer\Documents\Visual Studio 2015\Projects\BoostTest\BoostTest\BoostTest.obj 1

I tried to google it, but havn't found yet something that will fix this problem. how can I solve this?

推荐答案

basic_regex @ DU?
basic_regex@DU?


regex_traits @ DV?
regex_traits@DV?


w32_regex_traits @D @ boost @@@ boost @@@ boost @@ AAEAAV12 @ PBD0I @ Z)在函数public:class boost :: basic_regex>>& __thiscall boost :: basic_regex>>中引用:: assign(char const *,char const *,unsigned int)(?assign @?
w32_regex_traits@D@boost@@@boost@@@boost@@AAEAAV12@PBD0I@Z) referenced in function "public: class boost::basic_regex > > & __thiscall boost::basic_regex > >::assign(char const *,char const *,unsigned int)" (?assign@?


这篇关于如何解决VS 2015上的LNK 2019增强误差的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆