Error trying to build a static version of Qt 5.8 with ICU support

  • Hello, I'm new here, I've been using Qt for some time and consulting this forum, but this is my first question.
    I'm trying to compile a static version of Qt 5.8 (I obtained the source with git) on Windows 10 x64 with MSVC 2015, with ICU and OpenSSL support, I already compiled all builds of OpenSSL 1.1.0c and ICU 58.2, including a static build of ICU (with dynamic runtime) and I've installed all the requirements. During the configuration the test for ICU fails, if I remove the "-icu" option or try to configure a shared build, the configuration is successful, these are the commands I've used to configure Qt in the command line:

    SET "MSVC_ENV_BAT="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat""
    SET "MSVC_ARCH_SPEC=amd64"
    SET "ICU_ROOT=C:\APPS\PROGRAMMING\LIBRARIES\icu\icu-58.2-vs2015-static-dynrt"
    SET "QT5_SRC_ROOT=C:\APPS\PROGRAMMING\Qt\Compiled\src64"
    SET "QT5_PREFIX=C:\APPS\PROGRAMMING\Qt\Qt5.8-64\5.8\msvc2015_64_static"
    %comspec% /k "%MSVC_ENV_BAT%" %MSVC_ARCH_SPEC%
    SET "PATH=%PATH%;%QT5_SRC_ROOT%\qtbase\bin;%QT5_SRC_ROOT%\gnuwin32\bin;%QT5_SRC_ROOT%\qtrepotools\bin";%ICU_ROOT%\bin64;%OPEN_SSL_ROOT%\bin64
    SET "INCLUDE=%INCLUDE%;%ICU_ROOT%\include";%OPEN_SSL_ROOT%\include
    SET "LIB=%LIB%;%OPEN_SSL_ROOT%\lib64;%ICU_ROOT%\lib64"
    configure -recheck-all -verbose -static -debug-and-release -make libs -nomake examples -nomake tools -prefix "%QT5_PREFIX%" -platform win32-msvc2015 ^
    -qt-libpng -qt-libjpeg -gif -ico -qt-zlib -qt-pcre -sql-sqlite -sql-odbc -direct2d -opensource -confirm-license -opengl desktop ^
    -optimized-qmake -qt-freetype -openssl -openssl-linked -I "%OPEN_SSL_ROOT%\include" -L "%OPEN_SSL_ROOT%\lib64" ^
    OPENSSL_LIBS_DEBUG="libsslMDd.lib libcryptoMDd.lib" OPENSSL_LIBS_RELEASE="libsslMD.lib libcryptoMD.lib" ^
    -icu -I "%ICU_ROOT%\include" -L "%ICU_ROOT%\lib64"

    The error I get:


    Checking for ICU...
    Trying source 0 (type inline) of library icu ...
    Project ERROR: 'inline' source in library 'icu' does not specify 'libs'.
    Qmake failed, return code 3

    Any help would be appreciated. Best regards, Diego.


    After a long time I solved this problem with the information in these two bug reports, and ,according to these, patches were committed, hopefully in some future version the problem will be resolved in the sources, in the meantime I produced my own patches using that information, they are just a couple of lines in two files. Best regards, Diego.

  • I am having the same problem. Any help with this, anyone?

  • I met the same problem. Did anyone have a solution?

Log in to reply

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