views:

193

answers:

4

I am coding a c++ project with Qt Creator. Everything is working fine (debug, release), but when I run the compiled .exe directly (go to exe file and run it) it says mingwm10.dll is missing.

What can I do about this problem?

+2  A: 

You need to add the location of mingwm10.dll to your environment PATH variable.

chalup
where? ...........
Snoob
I don't know the path from the top of my head, but it's somewhere inside the SDK installation, e.g. $QTDIR/mingw/lib. I would search it in explorer and then copy it next to the .exe.For distributing, put the dll to the shipped Qt dlls.
Frank
Just to be more precise: I found it at `C:\Qt\2010.02.1\qt\bin\mingwm10.dll` on my computer.
ereOn
+2  A: 

Here is what you could do:

  • as chalup said, place you MINGW bin directory to you local/global PATH variable like that: My Computer|System Properties|Advenced|Environment Variables|System variables - select PATH string and press Edit button. After dialog appeared, add something like that - C:\MinGW\bin

  • Build you app without mingw, for example with Qt libraries 4.6.3 for Windows (VS 2008, 194 MB)

  • Just place mingwm10.dll into the directory with your executable file

mosg
A: 

You could also build your app statically if you want your application to function as a standalone .exe file.

http://www.formortals.com/how-to-statically-link-qt-4/

Kim
A: 

i try to add missed libraries to .exe (mingwm10.dll); but it again tell me that another librariy is missed; after add mingwm\lib to environment pass it tell me that QTcore4.dll is missed. try static linking is good solution

Waleed Samy