Linking error on compiling Qt 5.1.1 on Visual Studio 2008



  • Hi,

    I am getting following linking errors when compiling Qt 5.1.1 on VS 2008.

    @error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > __thiscall QString::toStdWString(void)const " (_imp?toStdWString@QString@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@XZ)
    error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > __thiscall QString::toStdWString(void)const " (_imp?toStdWString@QString@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@XZ) referenced in function "public: static void __cdecl CmsDebugTrace::DumpCallStack(void)" (?DumpCallStack@CmsDebugTrace@@SAXXZ)
    error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > __thiscall QString::toStdWString(void)const " (_imp?toStdWString@QString@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@XZ)
    error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > __thiscall QString::toStdWString(void)const " (_imp?toStdWString@QString@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@XZ)
    error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > __thiscall QString::toStdWString(void)const " (_imp?toStdWString@QString@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@XZ)
    error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QString::fromWCharArray(unsigned short const *,int)" (_imp?fromWCharArray@QString@@SA?AV1@PBGH@Z)
    unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QString::fromWCharArray(unsigned short const *,int)" (_imp?fromWCharArray@QString@@SA?AV1@PBGH@Z) referenced in function "public: virtual class CmsResultCode __thiscall Som_AT_18::Run(void)" (?Run@Som_AT_18@@UAE?AVCmsResultCode@@XZ)
    error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QString::fromWCharArray(unsigned short const *,int)" (_imp?fromWCharArray@QString@@SA?AV1@PBGH@Z)
    error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QString::fromWCharArray(unsigned short const *,int)" (_imp?fromWCharArray@QString@@SA?AV1@PBGH@Z)
    error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QString::fromWCharArray(unsigned short const *,int)" (_imp?fromWCharArray@QString@@SA?AV1@PBGH@Z)
    error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QString::fromWCharArray(unsigned short const *,int)" (_imp?fromWCharArray@QString@@SA?AV1@PBGH@Z)
    error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QString::fromWCharArray(unsigned short const *,int)" (_imp?fromWCharArray@QString@@SA?AV1@PBGH@Z)
    error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class QString __cdecl QString::fromWCharArray(unsigned short const *,int)" (_imp?fromWCharArray@QString@@SA?AV1@PBGH@Z)
    error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall QString::toWCharArray(unsigned short *)const " (_imp?toWCharArray@QString@@QBEHPAG@Z) referenced in function "public: class CmsResultCode __thiscall CmsOSWrapper::OSWrapperPrivate::CmsUserMachineUtils::CmsGetIPAddressByHostName(class QString const &,class QString &,enum CmsOSWrapper::IPVersion)" (?CmsGetIPAddressByHostName@CmsUserMachineUtils@OSWrapperPrivate@CmsOSWrapper@@QAE?AVCmsResultCode@@ABVQString@@AAV5@W4IPVersion@3@@Z)
    fatal error LNK1120: 3 unresolved externals
    1>Build log was saved at "file://q:\intermediate\cmskerneltest\bin\win32\debug\BuildLog.htm"
    Container - 15 error(s), 0 warning(s)
    @
    If anyone is having idea about the above linking errors.


Log in to reply
 

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