DLL is missing when launching Qt GUI app
My app launches from inside Qt Creator no problem, but when I go into the debug folder, I
find t开发者_运维问答he .exe
file and I try to launch it, it complains that there is a missing DLL called mingwm10.dll
.
I don't know how to fix this problem I tried the release as my build target, same thing happened.
Unless you compiled Qt statically and link to it statically, you will need to copy the Qt DLLs with your app when you go to deploy it to another computer, just copy the mingwm10.dll with them (it's in at least two places in my Qt install: <install path>\Qt\2010.02.1\mingw\bin
and <install path>\Qt\2010.02.1\qt\bin
).
For just running on your own machine, I would suggest you add the <install path>\Qt\2010.02.1\qt\bin
path to your "Path" environment variable. This should allow your apps to run properly outside the IDE without having to copy the dll around for every project until you go to deploy it elsewhere.
I think, there are two ways to fix this. You can copy the mingwm10.dll from the MinGW directory to the directory of your exe file or you can recompile Qt without the dependency to mingwm10.dll (which seems to be used for thread safe exception handling). I found some information about it here: http://lists.trolltech.com/qt-interest/2006-08/thread00942-0.html
精彩评论