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. Qt 5.0.0 for MSVC out of the box has HEAVY dependencies
Forum Updated to NodeBB v4.3 + New Features

Qt 5.0.0 for MSVC out of the box has HEAVY dependencies

Scheduled Pinned Locked Moved General and Desktop
22 Posts 8 Posters 14.5k 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.
  • A Offline
    A Offline
    astodolski
    wrote on last edited by
    #1

    In making the simplest app, I'm finding that the dependency list for the app is very large as compared to the same done with 4.8.4. The list of dependencies are:

    Qt5Widgets.dll
    Qt5Gui.dll
    Qt5Core.dll
    libGLESv2.dll
    D3DCompiler_43.dll
    icuuc49.dll
    icudt49.dll
    icuin49.dll
    icuuc49.dll

    I am not understanding why there are such shared libraries required - especially when not using direct 3d! It seems I'm not the only one with this problem. In trying to make portable an application by copying all it's dependencies, it seems that Qt 5.0 has become a pig.

    I haven't recompiled the build. I simple used it as posted from the downloads page.

    UPDATE:

    When all dependencies are included with the app, and the MSVC runtime is installed, the app still does not execute.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      codenode
      wrote on last edited by
      #2

      Maybe this thread will answer your question: http://qt-project.org/forums/viewthread/23210

      1 Reply Last reply
      0
      • U Offline
        U Offline
        utcenter
        wrote on last edited by
        #3

        You even missed a few, like EGL and the VS runtime, if for some reason not present :)

        You are not using D3D, but ANGLE which is the default openGL ES implementation that is being used by QtGui is using it.. for now, in the future the windows version will be build to use desktop OpenGL instead. You can rebuild Qt without the webkit and OpenGL to remove the GL, D3D and ICU dependencies.

        The dependencies are indeed absurd, you end up shipping like 30 MB of DLLs with your application, your other option is a static build, which will either require you to open your source or get a commercial license worth thousands of euro, which sounds like an evil Digial plot to use heavy dependencies to lure developers into going commercial :P :P

        Little do they know we can't really afford it ;)

        1 Reply Last reply
        0
        • J Offline
          J Offline
          joonhwan
          wrote on last edited by
          #4

          after read http://qt-project.org/forums/viewthread/23210, I myself give it a try deploy my Qt5 based win32 application in virtual-box'd windows xp like a virgin.

          I failed at first, but using dependencywalker's profiling feature, I found the reason why we cannot run qt5 application with thouse dlls already copied there.
          Qt5-app requires us to deploy plugins(like qwindows.dll which is located under qtbase\plugin\platforms)

          According to Qt Doc("Deploying Qt Applications" and "Using qt.conf"), we should deploy two kinds of files other than early loaded dll.

          qt.conf

          plugin dlls

          first one is a simple text file located in the same dir where app.exe file is. I wrote like this

          @
          [Paths]
          Prefix = .
          Plugins = plugins
          @

          Thas is for Qt5 to know the where the plugins are located.
          'Prefix' is relative path from your app.exe dir which can be retrived QApplication::applicationDirPath().
          and 'Plugins' is a directory name under 'Prefix'

          Second type of files is plugin dlls themselves. You just can copy all {qt5dir}\qtbase\plugins to your
          {application.exe dir}\plugins though *.exp, .pdb, .manifest. files are not necessary.

          I've tested using good old qt4 demo "undo" applications and my directories/files are like this(I removed non-necessary files. but might be wrong here. anyhow it works).

          @
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\D3DCompiler_43.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\icudt49.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\icuin49.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\icuuc49.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\libEGL.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\libGLESv2.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\plugins\imageformats\qgif.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\plugins\imageformats\qico.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\plugins\imageformats\qjpeg.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\plugins\imageformats\qmng.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\plugins\imageformats\qsvg.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\plugins\imageformats\qtga.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\plugins\imageformats\qtgad.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\plugins\imageformats\qtiff.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\plugins\imageformats\qwbmp.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\plugins\platforms\qminimal.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\plugins\platforms\qwindows.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\qt.conf
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\Qt5Core.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\Qt5Gui.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\Qt5Widgets.dll
          g:\VirtualBox.VM\vbox-share\qt5-undo-cleaned\undo.exe
          @

          May I could clean more and less. Btw, I still cannot make it work without installing vcredist_x86.exe.
          If you guys succeeded even on this, please share your knowledge.

          Hope this helps.

          joonhwan at gmail dot com

          1 Reply Last reply
          0
          • L Offline
            L Offline
            lgeyer
            wrote on last edited by
            #5

            Deployment size has unfortunately increased quite a bit on Windows, mostly due to the use of ICU for globalization support (which is mandatory for WebKit, not necessarily Qt) and DirectX for native hardware acceleration support on Windows.

            The 'good' thing is that this only affects the builds of Qt released by the QtProject (which are targetted at the largest possible audience and therefore include ICU, DirectX and WebKit support by default), and you are free to deploy a <code>-opengl desktop</code> and <code>-no-icu</code> Qt with your application, which has no dependency on icu*.dll, D3D*.dll and lib*.dll.

            You do not need a commerical license or a static build for that and building Qt is actually quite easy. Just "download the sources":http://qt-project.org/downloads, and run <code>configure -opengl desktop -no-icu</code> and <code>nmake</code> and grab a coffee.

            Worth mentioning that the QtProject will provide <code>-opengl desktop</code> builds with (most probably) Qt 5.0.2.

            1 Reply Last reply
            0
            • L Offline
              L Offline
              lgeyer
              wrote on last edited by
              #6

              [quote author="joonhwan" date="1358477255"]May I could clean more and less. Btw, I still cannot make it work without installing vcredist_x86.exe. If you guys succeeded even on this, please share your knowledge.[/quote]What you need is:

              • the Qt libraries of the modules used (like Qt5Core.dll, Qt5Gui.dll, or Qt5Widgets.dll)
              • the ICU libraries when used (icudt*.dll, icuin*.dll, icuuc*.dll)
              • the ANGLE libraries (DirectX support) when used (libEGL.dll, libGLESv2.dll)
              • at least one platform plugin (like platforms/qwindows.dll)
              • other plugins used (like imageformats/qjpeg.dll, sqldrivers/sqlite.dll)

              The ICU and ANGLE dependencies can be eliminated using the <code>-no-icu</code> and <code>-opengl desktop</code> / <code>-opengl none</code> configure switch.

              You will always have to distribute and install the VisualC++ Redistributale Package (vcredist_x86.exe) for any application built with MSVC.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                astodolski
                wrote on last edited by
                #7

                [quote author="codenode" date="1358464293"]Maybe this thread will answer your question: http://qt-project.org/forums/viewthread/23210[/quote]

                Not really. Looked like it was getting personal - especially near the bottom of the thread.

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  lgeyer
                  wrote on last edited by
                  #8

                  Which questions are still open?

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    astodolski
                    wrote on last edited by
                    #9

                    [quote author="Lukas Geyer" date="1358543359"]Which questions are still open?[/quote]

                    It seems (as stated in my thread update at the top) that even when dependencies are included, the build app WILL NOT execute outside of the build environment. No as much of a question, but the issue persists.

                    1 Reply Last reply
                    0
                    • U Offline
                      U Offline
                      utcenter
                      wrote on last edited by
                      #10

                      It does execute, you probably didn't put the platform plugin in a /platforms sub folder relative to the executable, I see it is missing in your initial post.

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        astodolski
                        wrote on last edited by
                        #11

                        [quote author="utcenter" date="1358546780"]It does execute, you probably didn't put the platform plugin in a /platforms sub folder relative to the executable, I see it is missing in your initial post.[/quote]

                        No it doesn't!

                        On my install, I located in the folder C:\Qt\Qt5.0.0\5.0.0\msvc2010\plugins\platforms the file qwindows.dll and added it to the folder which holds the app.exe The app doesn't even complain about any other missing dependency. No exception, no error dialog, nothing.

                        Steps to replicate:

                        1: Create a new Qt GUI Application
                        2: Build and run within Qt creator
                        3: Using the utility depends.exe (for Windows), determine each dependency and locally copy each DLL from where it is located on the build machine.
                        4: Add as suggested the DLL qwindows.dll

                        1 Reply Last reply
                        0
                        • U Offline
                          U Offline
                          utcenter
                          wrote on last edited by
                          #12

                          I've been able to run Qt5 GUI applications on another machine, even without walking the dependencies, all I needed were:

                          D3DCompiler_46.dll
                          libEGL.dll
                          libGLESv2.dll
                          msvcp110.dll
                          msvcr110.dll
                          Qt5Core.dll
                          Qt5Gui.dll
                          Qt5Widgets.dll
                          platforms\qwindows.dll

                          I didn't need ICU because I build Qt without the webkit. This might not be the case for the particular build you are using, but I can assure you, my executable run on other machines, tested a few just to make sure.

                          1 Reply Last reply
                          0
                          • JKSHJ Offline
                            JKSHJ Offline
                            JKSH
                            Moderators
                            wrote on last edited by
                            #13

                            [quote author="astodolski" date="1358555667"]I located in the folder C:\Qt\Qt5.0.0\5.0.0\msvc2010\plugins\platforms the file qwindows.dll and added it to the folder which holds the app.exe[/quote]It needs to be in a SUB-folder:

                            C:\MyApp\app.exe
                            C:\MyApp\platforms\qwindows.dll

                            [quote]The app doesn't even complain about any other missing dependency. No exception, no error dialog, nothing.

                            ....

                            3: Using the utility depends.exe (for Windows), determine each dependency and locally copy each DLL from where it is located on the build machine.[/quote]Note: Dependency Walker can't identify all DLLs. Specifically, if a DLL is loaded AFTER the app has started running (instead of getting loaded when the app is launched), Dependency Walker won't report it. In such a case, your app probably won't give an error message either.

                            libEGL.dll is one dependency that isn't reported; try including that too.

                            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              astodolski
                              wrote on last edited by
                              #14

                              [quote author="JKSH" date="1358611592"][quote author="astodolski" date="1358555667"]I located in the folder C:\Qt\Qt5.0.0\5.0.0\msvc2010\plugins\platforms the file qwindows.dll and added it to the folder which holds the app.exe[/quote]It needs to be in a SUB-folder:

                              C:\MyApp\app.exe
                              C:\MyApp\platforms\qwindows.dll

                              [quote]The app doesn't even complain about any other missing dependency. No exception, no error dialog, nothing.

                              ....

                              3: Using the utility depends.exe (for Windows), determine each dependency and locally copy each DLL from where it is located on the build machine.[/quote]Note: Dependency Walker can't identify all DLLs. Specifically, if a DLL is loaded AFTER the app has started running (instead of getting loaded when the app is launched), Dependency Walker won't report it. In such a case, your app probably won't give an error message either.

                              libEGL.dll is one dependency that isn't reported; try including that too.[/quote]

                              Works as instructed. Why the added libraries and folder requirement?

                              1 Reply Last reply
                              0
                              • U Offline
                                U Offline
                                utcenter
                                wrote on last edited by
                                #15

                                D3DCompiler_46.dll, libEGL.dll and libGLESv2.dll are requirements of ANGLE, which was chosen to address the fact Microsoft no longer provides OpenGL in "metro" mode in Windows 8. You can lose those dependencies by building Qt for desktop OpenGL or without OpenGL support.

                                Building without the webkit will get rid of the ICU* dependencies.

                                So in the end, you can limit your dependencies to Qt5Widgets.dll, Qt5Gui.dll, Qt5Core.dll which cannot really be classified as dependencies, since they are essential parts of Qt. Also the MSVC runtimes, if not present on the machine already.

                                The decision to use a dynamically loading platoform plugin was to make it easier to use different plugins and to make porting to new platforms easier. As of why the decision to put the platform plugin in a separate folder - I cannot tell.

                                1 Reply Last reply
                                0
                                • A Offline
                                  A Offline
                                  astodolski
                                  wrote on last edited by
                                  #16

                                  [quote author="utcenter" date="1358618851"]D3DCompiler_46.dll, libEGL.dll and libGLESv2.dll are requirements of ANGLE, which was chosen to address the fact Microsoft no longer provides OpenGL in "metro" mode in Windows 8. You can lose those dependencies by building Qt for desktop OpenGL or without OpenGL support.

                                  Building without the webkit will get rid of the ICU* dependencies.

                                  So in the end, you can limit your dependencies to Qt5Widgets.dll, Qt5Gui.dll, Qt5Core.dll which cannot really be classified as dependencies, since they are essential parts of Qt. Also the MSVC runtimes, if not present on the machine already.

                                  The decision to use a dynamically loading platoform plugin was to make it easier to use different plugins and to make porting to new platforms easier. As of why the decision to put the platform plugin in a separate folder - I cannot tell.[/quote]

                                  Very helpful!

                                  I (and I think most) can live with 3 - 4 core libraries. The choice then is to have at least two builds - one without webkit and OpenGL and one with them included? It seems that if there is a need for OpenGL then a rebuild of the core libraries is required?

                                  1 Reply Last reply
                                  0
                                  • A Offline
                                    A Offline
                                    astodolski
                                    wrote on last edited by
                                    #17

                                    [quote author="Lukas Geyer" date="1358500494"]Deployment size has unfortunately increased quite a bit on Windows, mostly due to the use of ICU for globalization support (which is mandatory for WebKit, not necessarily Qt) and DirectX for native hardware acceleration support on Windows.

                                    The 'good' thing is that this only affects the builds of Qt released by the QtProject (which are targetted at the largest possible audience and therefore include ICU, DirectX and WebKit support by default), and you are free to deploy a <code>-opengl desktop</code> and <code>-no-icu</code> Qt with your application, which has no dependency on icu*.dll, D3D*.dll and lib*.dll.

                                    You do not need a commerical license or a static build for that and building Qt is actually quite easy. Just "download the sources":http://qt-project.org/downloads, and run <code>configure -opengl desktop -no-icu</code> and <code>nmake</code> and grab a coffee.[/quote]

                                    Easy in theory.

                                    Rebuilding from source yields a different folder structure that what is represented by the SDK.

                                    There is no platforms folder.

                                    If opengl is to be removed, why are you suggesting -opengl desktop? Shouldn't it be -no-opengl?

                                    1 Reply Last reply
                                    0
                                    • C Offline
                                      C Offline
                                      ChrisW67
                                      wrote on last edited by
                                      #18

                                      utcenter wrote:

                                      bq. As of why the decision to put the platform plugin in a separate folder – I cannot tell.

                                      That is the way all the standard plugin groups are: each group has a sub folder (imageformats, sqldrivers etc.). Handling platform plugins differently would just be adding an exception to the established pattern.

                                      astodolski wrote:

                                      bq. If opengl is to be removed, why are you suggesting -opengl desktop? Shouldn’t it be -no-opengl?

                                      Maybe. If you want OpenGL support without ANGLE then use the desktop OpenGL option and understand you will have to revisit the decision for Windows 8 later on when some sort of whatever-we-are-supposed-call-Metro-now support is added and you want to use it. If you want no OpenGL support at all then build it out.

                                      http://qt-project.org/wiki/Qt-5-on-Windows-8-and-Metro-UI

                                      1 Reply Last reply
                                      0
                                      • L Offline
                                        L Offline
                                        lgeyer
                                        wrote on last edited by
                                        #19

                                        [quote author="astodolski" date="1358803926"]Rebuilding from source yields a different folder structure that what is represented by the SDK.[/quote]qtbase resembles Qt5.0.0/5.0.0/msvc2010.

                                        [quote author="astodolski" date="1358803926"]There is no platforms folder.[/quote]Take a look at qtbase/plugins.

                                        [quote author="astodolski" date="1358803926"]If opengl is to be removed, why are you suggesting -opengl desktop? Shouldn't it be -no-opengl?[/quote]<code>-no-opengl</code> will remove all OpenGL support in Qt, <code>-opengl desktop</code> will just remove DirectX support and the dependency on D3D*.dll and lib*.dll. You can pick whichever you prefer.

                                        1 Reply Last reply
                                        0
                                        • A Offline
                                          A Offline
                                          astodolski
                                          wrote on last edited by
                                          #20

                                          [quote author="Lukas Geyer" date="1358500494"]Just "download the sources":http://qt-project.org/downloads, and run <code>configure -opengl desktop -no-icu</code> and <code>nmake</code> and grab a coffee.[/quote]

                                          Near the end of the configure step, I get an error as shown in the console output:

                                              copy qmake.exe C:\Qt\qt-everywhere-opensource-src-5.0.0\qtbase\bin\qmake.exe
                                              1 file&#40;s&#41; copied.
                                          

                                          ASSERT: "fileName.isEmpty() || isAbsolutePath(fileName)" in file C:\Qt\qt-everywhere-opens
                                          ource-src-5.0.0\qtbase\qmake\library\ioutils.cpp, line 61
                                          QMake failed!
                                          *** qtbase/configure exited with non-zero status.

                                          C:\Qt\qt-everywhere-opensource-src-5.0.0>

                                          Starting to be quite the rabbit hole

                                          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