Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Building qt 5.15.1 static on windows using mingw

    General and Desktop
    2
    9
    556
    Loading More Posts
    • 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.
    • R
      raketmus last edited by

      Hello i am trying to build the newest version of qt on windows, using mingw 8.1.0 64 bit.
      using the following batch script to build

      set OPENSSL_DIR=C:\OpenSSL-Win64
      configure -release -static -opensource -confirm-license -static-runtime -no-pch -optimize-size -v -opengl desktop -platform win32-g++ -prefix "C:\Qt\QT-Static" -skip webengine -nomake tools -nomake tests -nomake examples -openssl-linked OPENSSL_INCDIR="%OPENSSL_DIR%\include" OPENSSL_LIBDIR="%OPENSSL_DIR%\lib\VC\static" OPENSSL_LIBS="-lWs2_32 -lGdi32 -lAdvapi32 -lCrypt32 -lUser32" OPENSSL_LIBS_DEBUG="-llibssl64MDd -llibcrypto64MDd" OPENSSL_LIBS_RELEASE="-llibssl64MD -llibcrypto64MD"
      mingw32-make install
      pause
      

      C:\OpenSSL-Win64 is my installtion of https://slproweb.com/products/Win32OpenSSL.html 1.1.1g 64bit
      building on http://download.qt-project.org/official_releases/qt/5.15/5.15.1/single/.
      This is the error i get

      ERROR: Feature 'openssl-linked' was enabled, but the pre-condition '!features.securetransport && !features.schannel && libs.openssl' failed.
      

      how can i fix this? full config.log here: https://pastebin.com/9Ya7AaS1.

      1 Reply Last reply Reply Quote 0
      • Christian Ehrlicher
        Christian Ehrlicher Lifetime Qt Champion last edited by Christian Ehrlicher

        Isn't this obvious enough?

        Trying source 1 (type inline) of library openssl ...
        Include path \\include is invalid.
        

        You have to escape the backslashes or use forward slashes

        Qt has to stay free or it will die.

        1 Reply Last reply Reply Quote 1
        • R
          raketmus last edited by raketmus

          https://doc.qt.io/qt-5/windows-requirements.html this said i should any ways fell kinda stupid for not checking that.

          1 Reply Last reply Reply Quote 0
          • Christian Ehrlicher
            Christian Ehrlicher Lifetime Qt Champion last edited by

            Now I really wonder what's going wrong since the examples also use backslashes and it works. Please try with escaping or forward slasshes, take a look in the config log if it works then and report back.

            Qt has to stay free or it will die.

            1 Reply Last reply Reply Quote 1
            • R
              raketmus last edited by

              hm yeah that wasent the issue.
              https://pastebin.pl/view/584a030c new config

              C:\Qt\qt-everywhere-src-5.15.1-2\configure.bat -release -static -opensource -confirm-license -static-runtime -no-pch -optimize-size -opengl desktop -platform win32-g++ -prefix "C:\Qt\QT-Static" -skip webengine -nomake tools -nomake tests -nomake examples -openssl-linked OPENSSL_INCDIR="C:\OpenSSL-Win64\include" OPENSSL_LIBDIR="C:\OpenSSL-Win64\lib\VC\static" OPENSSL_LIBS="-lWs2_32 -lGdi32 -lAdvapi32 -lCrypt32 -lUser32" OPENSSL_LIBS_DEBUG="-llibssl64MDd -llibcrypto64MDd" OPENSSL_LIBS_RELEASE="-llibssl64MD -llibcrypto64MD"
              mingw32-make
              mingw32-make install
              pause
              

              new ps1 file changed to absolute paths.

              1 Reply Last reply Reply Quote 0
              • Christian Ehrlicher
                Christian Ehrlicher Lifetime Qt Champion last edited by

                But now the config log output changed to undefined references to some functions. Since you're using mingw you should not use the msvc openssl libs.

                Qt has to stay free or it will die.

                1 Reply Last reply Reply Quote 1
                • R
                  raketmus last edited by

                  I switched to https://bintray.com/vszakats/generic/openssl for openssl but i now have a issue(which i also had before).
                  it seems that all the options cant be founde0711abf-bacc-4de5-b8f9-abe5ba5db329-image.png
                  i dont know how to solve this how would i got aboudt this?

                  1 Reply Last reply Reply Quote 0
                  • R
                    raketmus last edited by

                    Update using qt-lib for every lib worked some what removing almost all the warnings just 12a44cce-bea3-4cb6-8f83-f67f07b10d43-image.png left.

                    1 Reply Last reply Reply Quote 0
                    • R
                      raketmus last edited by

                      ok fixed that with the following line

                      configure.bat -release -static -opensource -confirm-license -static-runtime -qt-zlib -qt-libjpeg -qt-tiff -qt-webp -qt-libpng -qt-freetype -qt-pcre -qt-harfbuzz -gui -widgets -no-pch -opengl desktop -platform win32-g++ -prefix "C:\Qt\QT-Static-2" -skip webengine -nomake tools -nomake tests -nomake examples -openssl-linked OPENSSL_INCDIR="C:\OpenSSL-Win64\include" OPENSSL_LIBDIR="C:\OpenSSL-Win64\lib" OPENSSL_LIBS="-lWs2_32 -lGdi32 -lAdvapi32 -lCrypt32 -lUser32" OPENSSL_LIBS_DEBUG="-lssl -lcrypto" OPENSSL_LIBS_RELEASE="-lssl -lcrypto"
                      

                      issue is now it wont find the -lssl and -lcrypto when building the app even thoe it is there

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post