美文网首页IT.技术分享
Poco vs2010编译正常,vs2015编译报错"

Poco vs2010编译正常,vs2015编译报错"

作者: 5de9e117f2fe | 来源:发表于2019-05-14 10:19 被阅读3次

\color{rgb(255,0,0)}{错误如下:}

1>------ 已启动生成: 项目: Net, 配置: debug_shared Win32 ------
1>DNS.obj : warning LNK4075: 忽略“/EDITANDCONTINUE”(由于“/SAFESEH”规范)
1>  正在创建库 ..\lib\PocoNetd.lib 和对象 ..\lib\PocoNetd.exp
1>HTTPDigestCredentials.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > __thiscall Poco::StringTokenizer::begin(void)const " (__imp_?begin@StringTokenizer@Poco@@QBE?AV?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@std@@@std@@@std@@XZ),该符号在函数 "private: void __thiscall Poco::Net::HTTPDigestCredentials::createAuthParams(class Poco::Net::HTTPRequest const &,class Poco::Net::HTTPAuthenticationParams const &)" (?createAuthParams@HTTPDigestCredentials@Net@Poco@@AAEXABVHTTPRequest@23@ABVHTTPAuthenticationParams@23@@Z) 中被引用
1>HTTPDigestCredentials.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > __thiscall Poco::StringTokenizer::end(void)const " (__imp_?end@StringTokenizer@Poco@@QBE?AV?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@std@@@std@@@std@@XZ),该符号在函数 "private: void __thiscall Poco::Net::HTTPDigestCredentials::createAuthParams(class Poco::Net::HTTPRequest const &,class Poco::Net::HTTPAuthenticationParams const &)" (?createAuthParams@HTTPDigestCredentials@Net@Poco@@AAEXABVHTTPRequest@23@ABVHTTPAuthenticationParams@23@@Z) 中被引用
1>..\bin\PocoNetd.dll : fatal error LNK1120: 2 个无法解析的外部命令
1>已完成生成项目“Net_vs100.vcxproj”的操作 - 失败。
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========

\color{rgb(255,0,0)}{报错原因:}
由于该Poco版本较老,为1.4.6p2,在这个版本中,最高编译器支持为vs2012:

image.png
由于新编译器中存在C++ 11等因素,所以,直接升级编译器,是可能会出现错误的,而且该错误要修复需要解决代码及环境配置部分,相当复杂。

最直接也是最简单的解决办法就是,升级Poco版本,如poco-1.9.0:该版本已经支持到vs2017
image.png

相关文章

  • Poco vs2010编译正常,vs2015编译报错"

    由于该Poco版本较老,为1.4.6p2,在这个版本中,最高编译器支持为vs2012:

  • 2022-07-12 undefined reference t

    编译代码报错如下: /usr/bin/ld: /home/×××/lib/Poco/libPocoCrypto.a...

  • Execution failed for task ':zz:t

    背景 debug版本编译正常,release版本编译报错. 编译报错日志 分析 具体问题在报错信息中并不明显,没有...

  • Unreal Engine 疑难杂症

    VXGI 4.10 不能被VS2015预编译 在用VS2015编译VXGI 4.10时候,出现这样的错误"erro...

  • poco 编译 & sample

    先决条件 cmake工具安装 wget https://github.com/Kitware/CMake/rele...

  • 交叉编译POCO

    C++项目要提供给其他操作系统平台使用,需要我根据arm工具链进行编译后提供相应的头文件和库。项目中用到了POCO...

  • Tess4.0 windows编译与使用

    tesseract-OCR4.00 dev VS2015 安装编译 编译教程参考:https://github.c...

  • flutter报错信息汇总

    一: 报错信息 项目以前运行正常,突然就编译报错了,代码没有改过。 解决方法: google了一下,发现是编译问题...

  • log4cplus编译

    1. 使用visual studio编译 win10 vs2015编译过程 [https://www.freesi...

  • 开发经验

    VS2015 git不支持ssh协议 遇到编译报错的问题,有的时候重启下vs也许就能解决 Windows: 程序的...

网友评论

    本文标题:Poco vs2010编译正常,vs2015编译报错"

    本文链接:https://www.haomeiwen.com/subject/hmjjaqtx.html