[英]Compiling with Microsoft Visual C++ 2013 under Visual Studio 2015
我想将Qt 5.5与Microsoft Visual Studio 2015一起使用。但是,Microsoft编译器与Qt的最后兼容版本是MSVC2013。 因此,我想告诉Visual 2015使用“旧版”模式与旧版本的Microsoft编译器进行编译。
怎么做?
当我使用MSVC2015时,出现此错误:
Gravité Code Description Projet Fichier Ligne
Erreur LNK2019 symbole externe non résolu "__declspec(dllimport) char const
* __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z)
référencé dans la fonction "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::_System_error_category::message(int)const " (?message@_System_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z) helloworld C:\Users\roman\Documents\QtTest\bin\qtmaind.lib(qtmain_win.obj) 1
我认为这是因为Qt Lib是为MSVC2013编译的
您正在尝试将为VS 2013构建的Qt与VS 2015构建的代码一起使用。这将永远无法工作-Qt甚至都不是问题,而是在VS版本之间更改C ++ ABI。
所有C ++代码都必须使用相同的Visual Studio版本进行编译 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.