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. Static exe still requires a few dlls.
Forum Updated to NodeBB v4.3 + New Features

Static exe still requires a few dlls.

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
7 Posts 3 Posters 2.4k 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.
  • T Offline
    T Offline
    Tab-Trader
    wrote on last edited by
    #1

    Hello!

    I'm using Qt 5.9.1 msvc2015_static. I was build this version from sources using theese commands:

    configure.bat -prefix D:\Code\qt\Qt\5.9.1\msvc2015_static\ -platform win32-msvc2015 -recheck-all -commercial -confirm-license -debug-and-release -opengl desktop -no-angle -mp -static -no-shared -qt-zlib -qt-libjpeg -qt-libpng -qt-xcb -qt-freetype -qt-pcre -qt-harfbuzz -nomake examples -openssl-linked -I D:\Code\openssl\vc-win32\include -L D:\Code\openssl\vc-win32\lib -I D:\Code\qt\icu\include -L D:\Code\qt\icu\lib -I D:\Code\qt\angle\include -I D:\Code\qt\libevent-2.1.8-stable -L D:\Code\qt\libevent-2.1.8-stable -I D:\Code\qt\angle\src OPENSSL_LIBS="libeay32.lib ssleay32.lib gdi32.lib"
    
    nmake
    nmake install
    

    Now i sucsesfully build a Qt application using msvc2015_static. But the application still requires theese dlls:

    api-ms-win-downlevel-ole32-l1-1-0.dll
    api-ms-win-downlevel-user32-l1-1-0.dll
    api-ms-win-downlevel-version-l1-1-0.dll
    

    I'm using libs to build code (if I remove any linker retunrs "unresolved external symbol"):

    qtmain.lib
    Qt5Core.lib
    Qt5Gui.lib
    Qt5Network.lib
    Qt5Widgets.lib
    Qt5PlatformCompositorSupport.lib
    Qt5FontDatabaseSupport.lib
    Qt5EventDispatcherSupport.lib
    Qt5ThemeSupport.lib
    Qt5AccessibilitySupport.lib
    ssleay32.lib
    libeay32.lib
    advapi32.lib
    crypt32.lib
    gdi32.lib
    iphlpapi.lib
    mincore_downlevel.lib
    qtharfbuzz.lib
    qtlibpng.lib
    qtpcre2.lib
    qwindows.lib
    shell32.lib
    UxTheme.lib
    Version.lib
    winmm.lib
    Ws2_32.lib
    qtfreetype.lib
    imm32.lib
    dwmapi.lib
    LIBCPMT.LIB
    libcmt.lib
    libvcruntime.lib
    libucrt.lib
    uuid.lib
    kernel32.lib
    user32.lib
    oleaut32.lib
    ole32.lib
    comsupp.lib
    qico.lib
    qjpeg.lib
    

    Are there an solution to build my application fully statical without any dll's requirments?

    Thanks.

    1 Reply Last reply
    0
    • JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      https://stackoverflow.com/questions/38521156/how-can-i-get-rid-of-these-dll-dependencies

      ?

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Tab-Trader
        wrote on last edited by
        #3

        Downlevel means I'm using minimal version of MS SDK which works on windows 7 and 8. I'm using windows 10 for build.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi and welcome to devnet,

          You would need to re-built Qt to link against the static VS runtime.

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

          T 1 Reply Last reply
          2
          • SGaistS SGaist

            Hi and welcome to devnet,

            You would need to re-built Qt to link against the static VS runtime.

            T Offline
            T Offline
            Tab-Trader
            wrote on last edited by
            #5

            @SGaist Are there any options to configure static msvc linking into qt libs?

            My \Src\qtbase\mkspecs\common\msvc-desktop.conf contains theese strings:

            QMAKE_CFLAGS_RELEASE    = $$QMAKE_CFLAGS_OPTIMIZE -MT
            QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -MT -Zi
            QMAKE_CFLAGS_DEBUG      = -Zi -MTd
            

            Thank you.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              You have to modify the mkspec to use MT, so it looks like it has already been done.

              Did you also re-compiled all dependencies to be static ?

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

              T 1 Reply Last reply
              0
              • SGaistS SGaist

                You have to modify the mkspec to use MT, so it looks like it has already been done.

                Did you also re-compiled all dependencies to be static ?

                T Offline
                T Offline
                Tab-Trader
                wrote on last edited by
                #7

                @SGaist
                I think yes, I did. I'll check all dependencies again.

                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