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. Building qt 5.15.1 static on windows using mingw

Building qt 5.15.1 static on windows using mingw

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 2 Posters 952 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.
  • R Offline
    R Offline
    raketmus
    wrote on last edited by
    #1

    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
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by Christian Ehrlicher
      #2

      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 Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • R Offline
        R Offline
        raketmus
        wrote on last edited by raketmus
        #3

        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
        0
        • Christian EhrlicherC Online
          Christian EhrlicherC Online
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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 Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          1
          • R Offline
            R Offline
            raketmus
            wrote on last edited by
            #5

            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
            0
            • Christian EhrlicherC Online
              Christian EhrlicherC Online
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              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 Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              1
              • R Offline
                R Offline
                raketmus
                wrote on last edited by
                #7

                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
                0
                • R Offline
                  R Offline
                  raketmus
                  wrote on last edited by
                  #8

                  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
                  0
                  • R Offline
                    R Offline
                    raketmus
                    wrote on last edited by
                    #9

                    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
                    0

                    • Login

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