Unsolved Unresolved ICU Symbols
-
I am trying to build Qt 5.7 on Windows 7 using Visual Studio 13 and the ICU library. It is configured with the following command:
configure -debug-and-release -opensource -platform win32-msvc2013 -opengl desktop -angle -icu -I C:\icu\include -L C:\icu\lib64 -openssl -I C:\OpenSSL\x64\include -L C:\OpenSSL\x64\lib -nomake examples -nomake tests
It consistently fails to build with 35 undefined symbols from ICU, of the form
qtimezoneprivate_icu.obj : error LNK2019: unresolved external symbol _ucal_getDefaultTimeZone_55 referenced in function "class QByteArray __cdecl ucalDefaultTimeZoneId(void)" (?ucalDefaultTimeZoneId@@YA?AVQByteArray@@XZ)
It builds OK if I leave out the ICU parts from the configuration. Qt5.5.0 built OK with a similar configuration and this same version of ICU (55.1). Can anyone suggest what the problem might be?
Thanks
T Aldhous
-
Are you sure you're not running 32 bit compiler? It won't be able to link to 64b libraries
-
-
It is all built with the VC13 64 bit compiler. ICU is built using the allinone VC project using the 64bit Debug configuration. Qt is built using the config above from the 64 bit native tools command prompt of VC13.
-
@TAldhous said in Unresolved ICU Symbols:
It is all built with the VC13 64 bit compiler. ICU is built using the allinone VC project using the 64bit Debug configuration. Qt is built using the config above from the 64 bit native tools command prompt of VC13.
Hm, that looks OK, then.
Is it possible that Qt now depends on newer version of ICU and that is why this symbol is missing? I don't think so, because the compilation works fine - fail is at link time.
-
The symbol is in the library. I wondered about the leading underscore.
-
I have just checked the objects generated by the build, and, as suggested, they are x86 (32 bit) not x64. I'm clearly doing something stupid when I build. I thought configuring and building from a 64 bit native tools command prompt ensured it built with 64 bit? What am I doing wrong?
-
@TAldhous said in Unresolved ICU Symbols:
I thought configuring and building from a 64 bit native tools command prompt ensured it built with 64 bit?
I think that is the case, at least it used to be earlier (I have not build Qt myself in a while). You could experiment with adding ARCH argument.
The msvc-desktop.conf file contains this:
contains(QMAKE_TARGET.arch, x86_64) { DEFINES += WIN64 QMAKE_COMPILER_DEFINES += _WIN64 }
so it looks like it should be working automatically.
-
Solved it! Somehow a call to VCVARSall.BAT" had crept into my script for setting up the Qt5 build environment for Qt5.7. This silently changed the 64 bit tools to 32 bit tools. Scripts in my previous version do not have this line, so I don't know when I accidently copied it in.
Thanks for giving me the hint I needed to find the problem.
-
Great news! Happy further coding :-)