linking error in utility::conversions::to_string_t in qt creator



  • I am using cpprest with Qt Creator 4.2.1 Based on Qt 5.8.0 (MSVC 2015, 32 bit).

    I have modified the .pro file to indicate

    INCLUDEPATH += C:/cpprest/Release/include

    i am getting the following error :

    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) referenced in function "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)

    As per my understanding i need to set Treat wchar_t was Built-in Type to No in C/C++ -> Language. but this setting is for Visual Studios. How can i set this in QT creator?

    Till where i understand this is setting for Visual Studios. How can i set this in QT creator?



  • You did half the work (the INCLUDEPATH) now do the other half (the LIBS): http://doc.qt.io/qt-5/third-party-libraries.html#library-files


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.