Results 1 to 3 of 3

Thread: Qt 5.3.1: DLLs to distribute - which files/folders and why is it not automatic?

  1. #1
    Join Date
    Jun 2013
    Location
    Dresden - Germany
    Posts
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Question Qt 5.3.1: DLLs to distribute - which files/folders and why is it not automatic?

    Hi guys,

    I have just some questions. If I open in QtCreator the standard QtQuick-Application template it compiles and runs from QtCreator without any problems. But starting the *.exe file alone will give you missing dll errors. This is clear to me, and the background is the dynamic linking as far as I understand. But how can I know what I need? Which dlls have to be in the application folder, also I know it needs the /platforms folder with qwindows.dll. But why is this not done automatically? Why do I have to copy all the files in the right place, at least the dlls that are used in all cases - like qwindows.dll or some mingw specific ones - or is there an option I'm missing?

    So my question is: What is the exact structure, which dll files do I need on Windows 64Bit with Qt 5.3.1 and MinGW32?

    I also read this windows deployment page: http://doc.qt.io/qt-4.8/http://qt-project.org/doc/qt-5/windows-deployment.html
    And also this Wiki page, but it seems to be outdated, because QtQuick parts are not in the same folders anymore: Deploy_an_Application_on_Windows

    But both pages don't tell me what dll have to be delivered with the application and where to put them exactly.

    Thanks you very much!

    AlphaX2

  2. #2
    Join Date
    Sep 2014
    Location
    Sydney, Australia
    Posts
    16
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt 5.3.1: DLLs to distribute - which files/folders and why is it not automatic?

    Generally:

    Qt5Core.dll
    Qt5Gui.dll
    Qt5Widgets.dll
    icudt51.dll
    icuin51.dll
    icuuc51.dll
    libgcc_s_dw2-1.dll
    libstdc++-6.dll
    libwinpthread-1.dll

    Plus whatever extra modules you include in your project. Ie: Qt5Network.dll if your build uses the network module etc...
    Additionally on windows if you want an icon for your executable you will need qico.dll to be in a folder called "imageformats" with your application.

    ...and apparently with Qt5 you require:
    "platforms/qminimal.dll"
    "platforms/qwindows.dll"
    "libEGL.dll"
    "msvcr100.dll"
    "msvcp100.dll"
    if you plan to install on another machine.

    I know this seems a bit much, it did my brain in when I was trying to release my first application but you get used to it. I build my installers with NSIS, so I just wrote out the list of dlls in an NSIS script once and pretty much copy and paste the list whenever I'm building an installer for a new program.

    If you really don't want to go down this road: Read up on building Qt applications statically, it's a bit of a process to rebuild Qt statically but there's instructions on the web on how to do it. Then you can realease your applications without the dlls. That's what I'm planning to do now that I've migrated to Qt5. I'm deploying rather small applications (<1mB) and with Qt5's huge libraries it's excessive to have 40mB of libraries in my installer to download over our poor internet connections in Australia.

    As to why this isn't done automatically, I don't know, that's for someone else to answer. On Linux it's not a problem, many Linux distributions have Qt libraries already installed and your application can access them without needing the libs to be in the same directory, but on Win it just seems to be the way it is -_-
    "When the only tool you have is a hammer, every problem resembles a nail"

  3. #3
    Join Date
    Sep 2014
    Location
    Sydney, Australia
    Posts
    16
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt 5.3.1: DLLs to distribute - which files/folders and why is it not automatic?

    I feel that I should add: I made a static build of Qt today. It is a much easier process now. This page: http://qt-project.org/wiki/How-to-bu...-Windows-MinGW explains how to do it. The documentation seems to suggest that the preferred method of deploying Qt applications on Windows is to use your dynamically linked version of Qt for the development stage and then produce a static build of your application once you're ready to deploy it. This would avoid your DLL troubles entirely. hth
    "When the only tool you have is a hammer, every problem resembles a nail"

Similar Threads

  1. Replies: 8
    Last Post: 15th May 2012, 06:21
  2. Qt select folders and files dialog.
    By bunjee in forum Qt Programming
    Replies: 5
    Last Post: 13th July 2009, 09:53
  3. Replies: 1
    Last Post: 4th August 2008, 10:02
  4. viewing files or some folders
    By as001622 in forum Qt Programming
    Replies: 4
    Last Post: 2nd June 2008, 13:12
  5. How to manage files with different folders for make
    By rajeshs in forum Qt Programming
    Replies: 1
    Last Post: 7th July 2007, 14:44

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.