PDA

View Full Version : .EXE error when trying to run Application



ekartik82
4th March 2010, 13:45
Hello,
I'm using QtCreator through which the program compiles and builds sucessfully. However, when I try to double click the EXE file from the folder, it gives me an error saying "mingw10.dll was not found".

Can someone please suggest what needs to be done for this? I haven't used any command line tools so far as I'm doing everything through QtCreator. Are there any options for this in QtCreator itself? I'm running a Windows 7 64-bit system.

Thanks

Freetec
4th March 2010, 13:59
Hi,
The simplest solution is to copy the following files from your QT installation folder into your release build folder:

QtCore4.dll
QtGui4.dll
libgcc_s_dw2-1.dll
mingwm10.dll

But I am not sure if this means we have to copy these files to the user when we deploy our applications. There must be a more 'formal' solution I don't know yet, as I am also a newbee...

squidge
4th March 2010, 14:04
You need to copy those files to the user when you deploy your application.

If you want to use a single executable, then you must buy commercial license, or distribute your work under the GPL and offer anyone who asks the source code.

schnitzel
4th March 2010, 17:56
This link might help:
http://doc.qt.nokia.com/4.6/deployment-windows.html

Once you figure out all the dlls/plugins etc. you can use a third party installer creation tool such as nullsoft's NSIS.

ad5xj
4th March 2010, 20:25
It is obvious from your reference to mingw10.dll and .exe that you are on Windows. Fortunately for us, Qt has made the solution to your problem somewhat simple for us.

Follow these steps:
1) create a desktop shortcut and name it as you will.
2) right click on the shortcut and select Properties
3) in the shortcut tab of Properties edit the Target value to read "%COMSPEC% /k "C:\Qt\2009.03\bin\qtenv.bat" or where ever your Qt SDK install is located.
4) edit the Start In value to be your project folder
5) double click the shortcut to open the command window.
6) cd to where your exe is located - release or debug
7) type the entire name of your exe file (e.g. ./myapp.exe)

This procedure will set up the Qt environment and allow you to run your exe without substantial changes or copying files. Subtile variations from the normal Qt environment can be accommodated by copying the qtenv.bat file somewhere and editing it to fit your needs. The run your edited batch file.