A program is running fine in the compiler.But when I open the debugged .exe file it shows an error.
-
May be you guys have replied to this kind of problem before.But just to be sure:do I need to copy those .dll files to the same folder as the .exe file for each new program to make it run properly?I guess the answer would be yes.Now is there a way to find out at once which .dll files do I need to copy ?I am assuming that I need different .dll files for different programs.
-
Hi and welcome to devnet,
Indeed, this question has already been asked numerous times and still is. A quick search through the forum would have pointed you to the "Windows deployment guide":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html
Watch out specifically for the folder layout of the plugins and platform plugins
Happy deployment !
-
If you are in the debugger and are running your program, the environment variables for your system are already set by default for your instance of the creator.
If you go into your Qt install folder, you will see the bin and libs folder than contains all of the dll's. Most Qt debug dlls end with a 'd', like QtGuid.dll. What ever Qt modules you included in your .pro file should be present to the executable...so if:
QT += widgets
QT += core
QT += networkI would need:
Qt5Widgets.dll
Qt5Core.dll
Qt5Network.dllOr, you could add to your PATH environment variable the location of the Qt libraries (if your deploying on another system, you most likely want to ship the dlls with the exectuable).
Also, you have the option for static linking (everything built into the executable), or dynamic linking, depending on the license you have.
Take a look at this "link":http://qt-project.org/doc/qt-5.0/qtdoc/deployment.html.
Also, "dependency walker":http://www.dependencywalker.com/ is a great tool to figure out what are not present to your executable if it is unable to run (Qt5 has a bunch of other non Qt labeled dll's that are in the bin folder that are required for some windows systems).
Edit: Plus what he said above :)