Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Static build of Qt fails
QtWS25 Last Chance

Static build of Qt fails

Scheduled Pinned Locked Moved Solved General and Desktop
qt5.8.0windows10msvc2017openssl
10 Posts 2 Posters 5.7k Views
  • 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.
  • D Offline
    D Offline
    dr3mro
    wrote on 19 Mar 2017, 15:49 last edited by A Former User
    #1

    Hello ,
    I try to configure Qt Static with OpenSSL in windows and it Fails to configure Any help ?

    D:\Downloads\qt-everywhere-opensource-src-5.8.0>configure.bat -static -opensource -confirm-license -debug-and-release -platform win32-msvc2017 -sql-sqlite -sql-odbc -ssl -openssl-linked -opengl desktop  -no-compile-examples -nomake examples -make libs -nomake tools -nomake tests  -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -no-warnings-are-errors -no-qml-debug -strip -skip qtconnectivity OPENSSL_LIBS="-lssleay32 -llibeay32" -L C:\OpenSSL-win32\lib -L "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\um\x86" -l Gdi32 -l User32 -I C:\OpenSSL-win32\include -prefix C:\Qt\Static\5.8.0
    + cd qtbase
    + D:\Downloads\qt-everywhere-opensource-src-5.8.0\qtbase\configure.bat -top-level -static -opensource -confirm-license -debug-and-release -platform win32-msvc2017 -sql-sqlite -sql-odbc -ssl -openssl-linked -opengl desktop  -no-compile-examples -nomake examples -make libs -nomake tools -nomake tests  -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -no-warnings-are-errors -no-qml-debug -strip -skip qtconnectivity OPENSSL_LIBS="-lssleay32 -llibeay32" -L C:\OpenSSL-win32\lib -L "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\um\x86" -l Gdi32 -l User32 -I C:\OpenSSL-win32\include -prefix C:\Qt\Static\5.8.0
    Please wait while bootstrapping configure ...
    <srcbase> = D:/Downloads/qt-everywhere-opensource-src-5.8.0/qtbase
    <outbase> = D:/Downloads/qt-everywhere-opensource-src-5.8.0/qtbase
    
    jom 1.1.2 - empower your cores
    
    
    This is the Qt for Windows Open Source Edition.
    
    You have already accepted the terms of the license.
    
    Creating qmake...
    
    Microsoft (R) Program Maintenance Utility Version 14.10.25017.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    
    ERROR: Unknown command line option '-l'.
    
    Qmake failed, return code 3
    
    
    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 19 Mar 2017, 19:03 last edited by
      #2

      Hi,

      Like the error message states: configure doesn't support the -l switch. Remove them from your options.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dr3mro
        wrote on 19 Mar 2017, 23:43 last edited by
        #3

        this command argument "-l" was used with 5.6.2 & 5.7.0 and it worked
        If I dont add it Compile will fail ?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 20 Mar 2017, 08:06 last edited by
          #4

          Since Qt 5.8, the build system is being modified thus I'd guess that it might have become more sensible to that kind of things.

          In any case, the best thing to do is just try. I never had to tell configure to specifically link to Gdi32 nor User32.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dr3mro
            wrote on 20 Mar 2017, 10:29 last edited by
            #5

            I have tried and it fails with this error

            configure.bat -static -opensource -confirm-license -debug-and-release -platform win32-msvc2017 -sql-sqlite -sql-odbc -ssl -openssl-linked -opengl desktop  -no-compile-examples -nomake examples -make libs -nomake tools -nomake tests  -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -no-warnings-are-errors -no-qml-debug -strip -skip qtconnectivity OPENSSL_LIBS="-lssleay32 -llibeay32" -L C:\OpenSSL-win32\lib -L "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\um\x86" -I C:\OpenSSL-win32\include -prefix C:\Qt\Static\5.8.0
            
            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:..\..\bin\xmlpatterns.exe @D:\UserTemp\Temp\xmlpatterns.exe.12348.2532.jom
            libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp__CreateCompatibleBitmap@12 referenced in function _readscreen
            libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp__DeleteObject@4 referenced in function _readscreen
            libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp__GetDeviceCaps@8 referenced in function _readscreen
            libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp__GetDIBits@28 referenced in function _readscreen
            libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp__GetObjectA@12 referenced in function _readscreen
            ..\..\bin\xmlpatterns.exe : fatal error LNK1120: 5 unresolved externals
            jom: D:\Downloads\qt-everywhere-opensource-src-5.8.0\build\qtxmlpatterns\tools\xmlpatterns\Makefile.Release [..\..\bin\xmlpatterns.exe] Error 1120
            jom: D:\Downloads\qt-everywhere-opensource-src-5.8.0\build\qtxmlpatterns\tools\xmlpatterns\Makefile [release] Error 2
                    cd xmlpatternsvalidator\ && ( if not exist Makefile D:\Downloads\qt-everywhere-opensource-src-5.8.0\build\qtbase\bin\qmake.exe -o Makefile D:\Downloads\qt-everywhere-opensource-src-5.8.0\qtxmlpatterns\tools\xmlpatternsvalidator\xmlpatternsvalidator.pro -- -static -opensource -confirm-license -debug-and-release -platform win32-msvc2017 -sql-sqlite -sql-odbc -ssl -openssl-linked -opengl desktop -no-compile-examples -nomake examples -make libs -nomake tools -nomake tests -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -no-warnings-are-errors -no-qml-debug -strip -skip qtconnectivity "OPENSSL_LIBS=-lssleay32 -llibeay32" -L C:\OpenSSL-win32\lib -L "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\um\x86" -I C:\OpenSSL-win32\include -prefix C:\Qt\Static\5.8.0 ) && C:\Qt\Qt5.8.0\Tools\QtCreator\bin\jom.exe -f Makefile
            jom: D:\Downloads\qt-everywhere-opensource-src-5.8.0\build\qtxmlpatterns\tools\xmlpatternsvalidator\Makefile.Release [..\..\bin\xmlpatternsvalidator.exe] Error 1120
                    C:\Qt\Qt5.8.0\Tools\QtCreator\bin\jom.exe -f Makefile.Release
                    cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -O2 -MT -D_HAS_EXCEPTIONS=0 -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -DUNICODE -DWIN32 -DQT_NO_FOREACH -DQT_USE_QSTRINGBUILDER -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_XMLPATTERNS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\qtxmlpatterns\tools\xmlpatternsvalidator -I. -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\qtxmlpatterns\include -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\qtxmlpatterns\include\QtXmlPatterns -I..\..\include -I..\..\include\QtXmlPatterns -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\qtbase\include -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\qtbase\include\QtNetwork -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\build\qtbase\include -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\build\qtbase\include\QtNetwork -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\qtbase\include\QtCore -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\build\qtbase\include\QtCore -I.moc\release -IC:\OpenSSL-win32\include -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\qtbase\mkspecs\win32-msvc2017 -Fo.obj\release\ @D:\UserTemp\Temp\main.obj.7648.0.jom
            main.cpp
                    cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -O2 -MT -D_HAS_EXCEPTIONS=0 -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -DUNICODE -DWIN32 -DQT_NO_FOREACH -DQT_USE_QSTRINGBUILDER -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_XMLPATTERNS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\qtxmlpatterns\tools\xmlpatternsvalidator -I. -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\qtxmlpatterns\include -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\qtxmlpatterns\include\QtXmlPatterns -I..\..\include -I..\..\include\QtXmlPatterns -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\qtbase\include -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\qtbase\include\QtNetwork -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\build\qtbase\include -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\build\qtbase\include\QtNetwork -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\qtbase\include\QtCore -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\build\qtbase\include\QtCore -I.moc\release -IC:\OpenSSL-win32\include -ID:\Downloads\qt-everywhere-opensource-src-5.8.0\qtbase\mkspecs\win32-msvc2017 -Fo.obj\release\ @D:\UserTemp\Temp\xmlpatternsvalidator_plugin_import.obj.7648.0.jom
            xmlpatternsvalidator_plugin_import.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:..\..\bin\xmlpatternsvalidator.exe @D:\UserTemp\Temp\xmlpatternsvalidator.exe.7648.2062.jom
            libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp__CreateCompatibleBitmap@12 referenced in function _readscreen
            libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp__DeleteObject@4 referenced in function _readscreen
            libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp__GetDeviceCaps@8 referenced in function _readscreen
            libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp__GetDIBits@28 referenced in function _readscreen
            libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp__GetObjectA@12 referenced in function _readscreen
            ..\..\bin\xmlpatternsvalidator.exe : fatal error LNK1120: 5 unresolved externals
            jom: D:\Downloads\qt-everywhere-opensource-src-5.8.0\build\qtxmlpatterns\tools\xmlpatternsvalidator\Makefile [release] Error 2
            jom: D:\Downloads\qt-everywhere-opensource-src-5.8.0\build\qtxmlpatterns\tools\Makefile [sub-xmlpatterns-make_first] Error 2
            jom: D:\Downloads\qt-everywhere-opensource-src-5.8.0\build\qtxmlpatterns\tools\Makefile [sub-xmlpatternsvalidator-make_first] Error 2
            jom: D:\Downloads\qt-everywhere-opensource-src-5.8.0\build\qtxmlpatterns\Makefile [sub-tools-make_first] Error 2
            jom: D:\Downloads\qt-everywhere-opensource-src-5.8.0\build\Makefile [module-qtxmlpatterns-make_first] Error 2
            
            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 20 Mar 2017, 10:31 last edited by
              #6

              Those are dependencies of OpenSSL, then add these libraries to your OpenSSL specific parameters.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dr3mro
                wrote on 20 Mar 2017, 10:41 last edited by
                #7

                Like this ?

                configure.bat -static -opensource -confirm-license -debug-and-release -platform win32-msvc2017 -sql-sqlite -sql-odbc -ssl -openssl-linked -opengl desktop  -no-compile-examples -nomake examples -make libs -nomake tools -nomake tests  -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -no-warnings-are-errors -no-qml-debug -strip -skip qtconnectivity OPENSSL_LIBS="-lssleay32 -llibeay32 gdi32.lib User32.lib" -L C:\OpenSSL-win32\lib -L "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\um\x86" -I C:\OpenSSL-win32\include -prefix C:\Qt\Static\5.8.0
                
                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 20 Mar 2017, 14:49 last edited by
                  #8

                  No, add the -lGdi32 -lUser32 in place of your gdi32.lib User32.lib

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  D 1 Reply Last reply 20 Mar 2017, 22:49
                  0
                  • S SGaist
                    20 Mar 2017, 14:49

                    No, add the -lGdi32 -lUser32 in place of your gdi32.lib User32.lib

                    D Offline
                    D Offline
                    dr3mro
                    wrote on 20 Mar 2017, 22:49 last edited by dr3mro
                    #9

                    @SGaist said in Static build of Qt fails:

                    No, add the -lGdi32 -lUser32 in place of your gdi32.lib User32.lib

                    Thanks
                    honstly I have tried both and both works
                    :)
                    but now is there any link for dev version of Qt VS tools for VS 2017 ?
                    and is it possible to compile Qt static without QML ?

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 20 Mar 2017, 22:59 last edited by
                      #10

                      There's an initial release of the VS-AddIn here

                      Sure there is, just build qtbase statically then build only the modules you want by hand or exclude all the modules you don't want when calling configure.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0

                      6/10

                      20 Mar 2017, 10:31

                      • Login

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