0

I created a Qt App with Qt Creator. I want to send the stand-alone executable to a friend, but he can't execute the file. His error was that he is missing a lot of DLLs.

How can I compile a truly standalone executable? One such that my friend doesn't have to install any dlls or frameworks to execute this program?

I'm using the compiler: MinGW 4.9 (32-bit) and I have the QT version 5.4 or 5.5 (I am not sure). Here is a picture of his error (sadly it is in German, but I hope the google translator will help you):

Screencap of error

Nathaniel Ford
  • 20,545
  • 20
  • 91
  • 102
  • Possible duplicate of [How to deploy a Qt application on Windows?](http://stackoverflow.com/questions/622418/how-to-deploy-a-qt-application-on-windows) – MrEricSir Jan 28 '16 at 18:34
  • Welcome to [DLL hell](https://en.wikipedia.org/wiki/DLL_Hell). :D Please see http://stackoverflow.com/questions/1993390/static-linking-vs-dynamic-linking – Matthias W. Jan 28 '16 at 18:36

1 Answers1

0

Although this is not a proper distribution method, this should be enough for you now.

Copy the executable (.exe file) to another PC (or a virtual machine) without Qt installation. if you have Qt installed, it will find some libs from PATH variable (for ex, your dev PC)

Once copied, try to run that until you succeed. Until unless all the dependencies are satisfied, you will see the same error dialogue as your friend which will have dll name. Copy all the dlls required and zip the folder and send it across.

Most of the dlls are found in \Qt Dir\mingw492_32\bin and \Qt Dir\mingw492_32\plugins.

Hope this helps.

ramtheconqueror
  • 1,907
  • 1
  • 22
  • 35
  • You probably want to use windeployqt to make this easier: http://doc.qt.io/qt-5/windows-deployment.html – rm5248 Jul 19 '16 at 15:03