zoukankan      html  css  js  c++  java
  • Poco vs2010编译正常,vs2015编译报错"无法解析的外部符号"

    错误如下:

    1>------ 已启动生成: 项目: Net, 配置: debug_shared Win32 ------
    1>DNS.obj : warning LNK4075: 忽略“/EDITANDCONTINUE”(由于“/SAFESEH”规范)
    1>  正在创建库 ..libPocoNetd.lib 和对象 ..libPocoNetd.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>..inPocoNetd.dll : fatal error LNK1120: 2 个无法解析的外部命令
    1>已完成生成项目“Net_vs100.vcxproj”的操作 - 失败。
    ========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0==========
    

    报错原因:
    由于该Poco版本较老,为1.4.6p2,在这个版本中,最高编译器支持为vs2012:
    image.png
    由于新编译器中存在C++ 11等因素,所以,直接升级编译器,是可能会出现错误的,而且该错误要修复需要解决代码及环境配置部分,相当复杂。
    解决方案:
    最直接也是最简单的解决办法就是,升级Poco版本,如poco-1.9.0:该版本已经支持到vs2017
    image.png

  • 相关阅读:
    kyeremal-bzoj2038-[2009国家集训队]-小z的袜子(hose)-莫队算法
    移位操作之旋转移位
    leetcode 二分查找 Search in Rotated Sorted Array
    背包算法练习--求小于某数字的数组最大和:
    Splunk 会议回想: 大数据的关键是机器学习
    CSDN个人空间、问答频道停站维护公告
    HDFS主要节点解说(一)节点功能
    24点
    【Nginx】事件驱动框架和异步处理
    OC中字符串的提取与替换-四种不同方法实现
  • 原文地址:https://www.cnblogs.com/SunkingYang/p/11049093.html
Copyright © 2011-2022 走看看