Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Detection of icu libs fails with VS2017
Qt 6.11 is out! See what's new in the release blog

Detection of icu libs fails with VS2017

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 587 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    user4592357
    wrote on last edited by
    #1

    I'm building Qt 5.11.1 from sources with VS2017 build tools. The environment I set is as follows:

    set QTDIR=%CD%
    set PATH=%PATH%;%QTDIR%\qtbase\bin;C:\Oracle11\client11.2.0\bin;C:\Python27\;C:\ruby_2.0.0\bin;C:\Python27\Scripts\;C:\Perl64\site\bin;C:\Perl64\bin;C:\GnuWin32\bin;C:\icu\bin64
    call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat"
    set INCLUDE=%INCLUDE%;C:\app\client\x\product\12.2.0\client_1\oci\include;C:\Python27\include;C:\ruby_2.0.0\include;"C:\mysql-5.5\include;C:\icu\include";"C:\Program Files (x86)\Windows Kits\10\Include"
    set LIB=%LIB%;C:\app\client\x\product\12.2.0\client_1\oci\lib\msvc;C:\Python27\Lib;C:\ruby_2.0.0\lib;"C:\mysql-5.5\lib";C:\icu\lib64;"C:\Program Files (x86)\Windows Kits\10\Lib"
    

    then call the configure script:

    configure -prefix %QTDIR%\_STAGE -platform win32-msvc -commercial -confirm-license -release -shared -qt-libjpeg -qt-libpng -no-cups -no-mtdev -nomake examples -icu -plugin-sql-mysql -plugin-sql-odbc -plugin-sql-sqlite -opengl dynamic -skip qtconnectivity -skip webengine -D _IGNORE_FINAL
    

    The script does some work, and when checking the configurations, it fails - cannot find icu:

    ERROR: Feature 'icu' was enabled, but the pre-condition 'libs.icu' failed.  
    Check config.log for details.
    

    Here's the relevant part from config.log:

    loaded result for library config.qtbase_corelib.libraries.icu
    Trying source 0 (type inline) of library icu ...
      => source failed condition 'config.win32 && !features.shared'.
    Trying source 1 (type inline) of library icu ...
    + cd /d C:\Users\x\Documents\qt\config.tests\icu && C:\Users\x\Documents\qt\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "DEFINES += _IGNORE_FINAL" "LIBS += -licuin -licuuc -licudt" C:/Users/x/Documents/qt/config.tests/icu
    + cd /d C:\Users\x\Documents\qt\config.tests\icu && set MAKEFLAGS=& nmake
    > Microsoft (R) Program Maintenance Utility Version 14.15.26726.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    >   cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -O2 -MD -W0 -EHsc -DUNICODE -D_UNICODE -DWIN32 -DWIN64 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_IGNORE_FINAL -DNDEBUG -I. -IC:\Users\x\Documents\qt\qtbase\mkspecs\win32-msvc -Fo @C:\Users\x\AppData\Local\Temp\8\nm8F4F.tmp
    > main.cpp
    >   link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:icu.exe @C:\Users\x\AppData\Local\Temp\8\nm91F0.tmp
    > main.obj : error LNK2019: unresolved external symbol ucol_open_57 referenced in function main
    > main.obj : error LNK2019: unresolved external symbol ucol_close_57 referenced in function main
    > icu.exe : fatal error LNK1120: 2 unresolved externals
    > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\bin\HostX64\x64\link.EXE"' : return code '0x460'
    > Stop.
    

    I tried to build the standalone main.cpp from config.tests\icu with

    cl main.cpp /EHsc
    

    and got the same linker error. Then I added the libs path and the libs and the build succeeded:

    cl main.cpp /EHsc /link /LIBPATH:C:\icu\lib64 icudt.lib icuin.lib icuio.lib icule.lib iculx.lib icutu.lib icuuc.lib
    

    But when I added the libs to configure script, got the same linker error.

    Any idea what I'm doing wrong or missing?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved