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. running static-deployed .exe in virtualbox fails with missing jpg/freetype/png.dlls
Forum Updated to NodeBB v4.3 + New Features

running static-deployed .exe in virtualbox fails with missing jpg/freetype/png.dlls

Scheduled Pinned Locked Moved Solved Installation and Deployment
9 Posts 2 Posters 685 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.
  • R Offline
    R Offline
    raaraa
    wrote on last edited by raaraa
    #1

    Hello,
    I don't fully understand, the point of static deploy would be to get rid of dll dependencies, no?

    I'm trying to deploy a win10 application that i made using qt 5.15.1 & qtcharts.
    I managed to build a static version of qt and linked my project against it, but when i try to launch it inside a vm, it fails on start,asking for the dlls i mentioned.

    Please help me out :(

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

      Hi,

      Using a static library does not mean said library does not have dynamic dependencies. On Windows for example, the shared C++ runtime is usually used.

      How exactly did you build Qt ?

      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
      2
      • R Offline
        R Offline
        raaraa
        wrote on last edited by raaraa
        #3

        Hello,

        I used the installer to acquire 5.15.1 source code, then ran configure using powershell:

        ./configure -static -static-runtime -release -platform win32-g++ -nomake tools -nomake tests -nomake examples -prefix "C:\QtStatic\"
        

        After this i invoked the makefile:

        mingw32-make -j6
        mingw32-make install -j6
        

        Then I built my project:

        C:\QtStatic\bin\qmake.exe -config release
        mingw32-make -j6
        

        Oddly enough, the makefile that was generated for my project contains the "missing" libraries:

        ...
        DEFINES       = -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_NO_DEBUG -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN
        CFLAGS        = -fno-keep-inline-dllexport -O2 -Wall -Wextra -Wextra -ffunction-sections -fdata-sections $(DEFINES)
        CXXFLAGS      = -fno-keep-inline-dllexport -O2 -std=gnu++1y -Wall -Wextra -Wextra -ffunction-sections -fdata-sections -fexceptions -mthreads $(DEFINES)
        INCPATH       = -I. -I..\..\..\..\QtStatic\include -I..\..\..\..\QtStatic\include\QtCharts -I..\..\..\..\QtStatic\include\QtWidgets -I..\..\..\..\QtStatic\include\QtGui -I..\..\..\..\QtStatic\include\QtANGLE -I..\..\..\..\QtStatic\include\QtCore -Irelease -I. -I..\..\..\..\VulkanSDK\1.2.131.2\include -I..\..\..\..\QtStatic\mkspecs\win32-g++ 
        LINKER      =        g++
        LFLAGS        =        -Wl,-s -static -Wl,--gc-sections -Wl,-subsystem,windows -mthreads
        LIBS        =        C:\QtStatic\plugins\imageformats\libqjpeg.a -ljpeg C:\QtStatic\plugins\imageformats\libqgif.a C:\QtStatic\plugins\imageformats\libqtiff.a -ltiff C:\QtStatic\plugins\styles\libqwindowsvistastyle.a C:\QtStatic\plugins\platforms\libqwindows.a -lwinspool -lshlwapi -lwtsapi32 C:\QtStatic\lib\libQt5EventDispatcherSupport.a C:\QtStatic\lib\libQt5FontDatabaseSupport.a -lfontconfig -lfreetype -ldwrite -ld2d1 C:\QtStatic\lib\libQt5ThemeSupport.a C:\QtStatic\lib\libQt5AccessibilitySupport.a C:\QtStatic\lib\libQt5VulkanSupport.a C:\QtStatic\lib\libQt5WindowsUIAutomationSupport.a C:\QtStatic\plugins\imageformats\libqicns.a C:\QtStatic\plugins\imageformats\libqico.a C:\QtStatic\plugins\imageformats\libqtga.a C:\QtStatic\plugins\imageformats\libqwbmp.a C:\QtStatic\plugins\imageformats\libqwebp.a -lwebp -lwebpdemux -lwebpmux C:\QtStatic\lib\libQt5Charts.a C:\QtStatic\lib\libQt5Widgets.a -luxtheme -ldwmapi C:\QtStatic\lib\libQt5Gui.a -ld3d11 -ldxgi -ldxguid -lpng16 C:\QtStatic\lib\libqtharfbuzz.a -lgdi32 -lcomdlg32 -loleaut32 -limm32 C:\QtStatic\lib\libQt5Core.a -lmpr -luserenv -lversion -lz C:\QtStatic\lib\libqtpcre2.a -lnetapi32 -lws2_32 -ladvapi32 -lkernel32 -lole32 -lshell32 -luuid -luser32 -lwinmm  -lmingw32 C:\QtStatic\lib\libqtmain.a -lshell32 
        QMAKE         = C:\QtStatic\bin\qmake.exe
        ...
        

        My goal would be to be able to deploy a qt 5.15.1 application that uses widgets for ui & qtcharts, preferably as a single executable.

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

          What missing libraries are you referring to ?

          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
          • R Offline
            R Offline
            raaraa
            wrote on last edited by
            #5

            libfreetype-6__.dll, libpng16-16__.dll, libtiff-5__.dll, libjpeg-9_.dll

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

              Do you have the static versions of these ?

              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
              1
              • R Offline
                R Offline
                raaraa
                wrote on last edited by
                #7
                LIBS        =        C:\QtStatic\plugins\imageformats\libqjpeg.a -ljpeg C:\QtStatic\plugins\imageformats\libqgif.a C:\QtStatic\plugins\imageformats\libqtiff.a -ltiff C:\QtStatic\plugins\styles\libqwindowsvistastyle.a C:\QtStatic\plugins\platforms\libqwindows.a -lwinspool -lshlwapi -lwtsapi32 C:\QtStatic\lib\libQt5EventDispatcherSupport.a C:\QtStatic\lib\libQt5FontDatabaseSupport.a -lfontconfig -lfreetype -ldwrite -ld2d1 C:\QtStatic\lib\libQt5ThemeSupport.a C:\QtStatic\lib\libQt5AccessibilitySupport.a C:\QtStatic\lib\libQt5VulkanSupport.a C:\QtStatic\lib\libQt5WindowsUIAutomationSupport.a C:\QtStatic\plugins\imageformats\libqicns.a C:\QtStatic\plugins\imageformats\libqico.a C:\QtStatic\plugins\imageformats\libqtga.a C:\QtStatic\plugins\imageformats\libqwbmp.a C:\QtStatic\plugins\imageformats\libqwebp.a -lwebp -lwebpdemux -lwebpmux C:\QtStatic\lib\libQt5Charts.a C:\QtStatic\lib\libQt5Widgets.a -luxtheme -ldwmapi C:\QtStatic\lib\libQt5Gui.a -ld3d11 -ldxgi -ldxguid -lpng16 C:\QtStatic\lib\libqtharfbuzz.a -lgdi32 -lcomdlg32 -loleaut32 -limm32 C:\QtStatic\lib\libQt5Core.a -lmpr -luserenv -lversion -lz C:\QtStatic\lib\libqtpcre2.a -lnetapi32 -lws2_32 -ladvapi32 -lkernel32 -lole32 -lshell32 -luuid -luser32 -lwinmm  -lmingw32 C:\QtStatic\lib\libqtmain.a -lshell32
                

                i guess?

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

                  These are the plugins so yes the plugins are static. I am asking about their dependencies.

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

                    Thank you for helping me understand what the problem was.

                    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