Building Qt with OpenSSL and ICU support FAILED



  • Hello all,

    I'm making a program using webkit to view a site with https. However, the current official release of 5.1.1 does not contain openssl support and I'm willing to build one by myself.
    I built one under this tutorial
    https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW
    and this one for building ICU modual

    But while I compiled with the following configuration using my own build of ICU,

    configure.bat -debug-and-release -platform win32-g++ -prefix $QtDir ` 
    -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -qt-sql-sqlite ` 
    -icu -I C:\source\icu2\include -L C:\source\icu2\lib ` 
    -openssl -I C:\source\openssl-1.0.2ae\include -L C:\source\openssl-1.0.2e `
    -opensource -confirm-license `
    -make libs -nomake tools -nomake examples -nomake tests
    

    it always return an error of "cannot find -licuxx". But I'm sure the files can be found under lib path I provide from configre.

    mingw32-make : C:/Qt/Qt5.5.1/Tools/mingw492_32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -licuin
    C:\source\windows-build-qt-static_1.ps1:173 : 5
    +     mingw32-make -k install
    +     ~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (C:/Qt/Qt5.5.1/T...ot find -licuin:String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError
     
    C:/Qt/Qt5.5.1/Tools/mingw492_32
    /bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -licuuc
    C:/Qt/Qt5.5.1/Tools/mingw492_32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../..
    /i686-w64-mingw32
    /bin
    /ld.exe
    : cannot find
     -licudt
    collect2.exe: error: ld returned 1 exit status
    

    Please help me to find a way to solve it, or othe way to obtain a build with openssl support?
    Thanks a lot!


  • Moderators

    @Leonis
    i don't see that you specify the path to icu libs (using -L linker parameter) like you did for the openssl libs



  • @raven-worx Thanks for your reply
    I wrote the icu libs link above the openssl, but still not work...

    ...
    -icu -I C:\source\icu2\include -L C:\source\icu2\lib
    -openssl -I C:\source\openssl-1.0.2ae\include -L C:\source\openssl-1.0.2e
    ...
    


  • I wander I built the ICU with dynamic way, do I need to build it statically?


  • Moderators

    @Leonis said:

    I wander I built the ICU with dynamic way, do I need to build it statically?

    in general not. It's supported to mix static and dynamic libs.
    But i don't know what the -icu switch in combination with the -static switch does internally.
    I guess you have to link icu statically in the end.

    But nevertheless, your current error isn't a linkage error. It already can't find the specified lib.



  • I'm feeling strange that the include files can be found but not for the dlls. I'm going to try another way from the beginning and guessing might be the problem by the script provided by the tutorial mention above. Because the way in the tutorial does not contain ssl.


  • Moderators

    Did you build icu by yourself? If so did you use the same compiler. If not you should check which compiler was used.


  • Moderators

    i still think there is simpler explanation for your issue.
    The linker can't even find the lib file specified.
    Are you really sure that the libs are in "C:\source\icu2\lib"? And not in a release/debug subfolder, etc.?


Log in to reply
 

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