【发布时间】:2017-03-27 18:15:34
【问题描述】:
我在 Qt Creator 4.2.1 中使用 cpprest 基于 Qt 5.8.0(MSVC 2015,32 位)。
我已经修改了.pro文件来表示
INCLUDEPATH += C:/cpprest/Release/include
我收到以下错误:
mainwindow.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_string,class std::allocator > __cdecl utility::conversions::to_string_t(class std::basic_string,class std::allocator > const &)" (__imp_?to_string_t@conversions@utility@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEBV ?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@4@@Z) 在函数“class web::uri __cdecl generateOMDBQuery(class std::basic_string,class std: :allocator > const &)" (?generateOMDBQuery@@YA?AVuri@web@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
按照this的回答我需要设置
在C/C++ -> 语言中将wchar_t 是内置类型 处理为否。
直到我明白这是 Visual Studios 的设置。如何在 QT creator 中设置?
【问题讨论】:
-
这个项目没有使用导入库可能是原因。