I recently upgraded my project to Qt 5.0.0, and after fixing up some compile errors, i finally got it to compile successfully, only to get this link error:
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)
To copy to clipboard, switch view to plain text mode
After googling, i found some answers. But i checked and i have set “Treat wchar_t as built in type†to “noâ€. And i have added Qt5Core.lib/Qt5Cored.lib to the linker.
Here is the build output in diagnostic mode, if anyone is interested. I don’t see much regarding linking, and the only reference to fromWCharArray are the final errors.
Strangely, it actually built successfully when i set "wchar_t as build in type" to "yes". It crashed when i ran it, but that may have been caused by something else.
Should i try and find out why this setting is misbehaving, or should i just implement this solution?
Bookmarks