Poco vs2010 compile properly, vs2015 compiler error "unresolved external symbol"

Copyright: Since May 13, 2019, all technical blog article on this website and Jane book synchronization. https://blog.csdn.net/y601500359/article/details/90204763

Error as follows:

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==========

Error reason:
Since the Poco older version, as1.4.6p2, in this version, the highest compiler support for vs2012:
image.png
Since C ++ 11 factors such as the presence of a new compiler, so a direct upgrade compiler, is likely to be an error, and to fix the error code that need to be addressed and environment configuration section, quite complex.
Solution:
The most direct and easiest solution is to upgrade Poco version, such aspoco-1.9.0: This version has support to vs2017
image.png

Guess you like

Origin blog.csdn.net/y601500359/article/details/90204763