Goodarz Mehr
Goodarz Mehr

Reputation: 133

How to run a Qt-based program on windows

Recently, I've written a program using the Qt Creator. It runs well when I execute it using the IDE, but when I want to run the .exe file alone, warnings appear that files like mingw10.dll, QtCore4.dll, etc. are missing from the computer. Does anyone know how can I solve this problem?

Upvotes: 1

Views: 488

Answers (2)

Zlatomir
Zlatomir

Reputation: 7034

You copy those dlls from: MinGW_install\bin and qt_install_path\bin in the same folder with your application.

A cool tool you can use to see what is needed is DependencyWalker

And also you can read more in Qt documentation - they present there the static build too you create a big exe that doesn't need Qt dlls - but note that you have to build Qt yourself and LGPL has some restriction about that (so i guess you can ignore the static build part and read about the plugins deployment there)

Upvotes: 1

Leo Chapiro
Leo Chapiro

Reputation: 13979

Take a look at that:

https://stackoverflow.com/a/621337/1758762

If you have built a 'release' version of your program, copy it and the following DLL's from qt\bin to a directory:

QtCore4.dll, QtGui4.dll and mingwm10.dll (if you are compiling with gcc and minGW).

Upvotes: 2

Related Questions