PDA

View Full Version : Problem on runnig exe file after build in Qt



mazd
1st October 2010, 13:12
hi,am new in Qt and this forum either.i tried to build and run sample application come with Qt open-source version, the problem is;
>it work and run fine after build in QT Creator but when i browse to output folder,under release folder and try to run exe created(my program)-i get a message saying:" This application has failed to start because mingwm10.dll was not found.Re-installing the application may fix this problem"

WHAT I DID?
1.Re-installing the Qt 4.
2.Restart system.

Please any help..

Zlatomir
1st October 2010, 13:23
You can find that dll in: Qt_INSTALL_FOLDER\mingw\bin //you are going to need another dll from that folder "libgcc_s_dw2-1.dll"

And after that you need Qt's dll's from Qt_INSTALL_FOLDER\qt\bin (those from Qt_INSTALL_FOLDER\bin don't work with your application, those are used by Qt Creator)
Copy those dll's in the same folder as your .exe file
Note: You need to copy QtGuid4.dll for the debug build and QtGui4.dll for release build

mazd
1st October 2010, 13:36
wow!--Thanks for your concept of copying missing dll form those folders, it work now!-she need QtCore.dll too just i gave it to her..Happy coding.

Zlatomir
1st October 2010, 13:57
On your development PC you can also add those paths to the Environment variables -> Path
You can add a line that looks like this: (example for Qt SDK installed in it's default folder)


C:\Qt\2010.05\mingw\bin;C:\Qt\2010.05\qt\bin

Note: Don't forget to put ; between different paths

But if you execute your application on another PC you will need to copy those dll's

mazd
1st October 2010, 14:04
Can you show me where to get such place?.

Zlatomir
1st October 2010, 14:14
On Win 7 you (i don't have XP, but it is something similar):
right click on Computer;
Click Advanced system settings;
Select the Advanced tab;
Click on Environment variables button;
You have two lists with variables (user and system) in the System one scroll down till you find and select the one named Path;
With Path selected click on edit; (careful so you DON'T delete anything)
On the Variable value add the line (make sure you add the path where you installed Qt, and don't forgot the ; most likely the last path in there doesn't have one at the end so you need to put one...)

mazd
1st October 2010, 14:30
Well done!,last question please:How can i change icon of my exe, it seem to have icon like console application that am familiar with!.

Zlatomir
1st October 2010, 14:51
I didn't use this, but here is a link (http://doc.qt.nokia.com/4.6/appicon.html) that will help you.

wiralim
6th April 2012, 17:01
thx for the information