PDA

View Full Version : Application won't run - missing DLLs?



N3wb
21st September 2009, 06:06
I can run my application from Qt Creator, but a problem arises when I try to run the application (release version) by browsing to the executable and opening it. I get this error:


This application has failed to start because mingwm120.dll was not found. Re-installing the application may fix this problem.

I searched my system and found that DLL, stuck it in the same folder as the executable, and then tried running again. Another error. Different, but it still says a DLL "was not found." I repeated this process a few times, but I'm planning on sometime distributing my program and it doesn't seem convenient to have who knows how many DLLs that go along with it.

Any ideas why this is happening? Is there a way to build the DLLs into the executable or something?

Appreciate any advice you might have, thanks!

SudaNix
21st September 2009, 10:36
Add the bin directory for Mingw and Qt to the PATH Environment Variable and it should work.


Is there a way to build the DLLs into the executable or something?
re-compile Qt in static version, so the dll is merged with the executable.

read this articles on the wiki:
http://wiki.qtcentre.org/index.php?title=Building_static_applications
http://wiki.qtcentre.org/index.php?title=Building_static_Qt_on_Windows

and search the forum to find more info.

Chisum
21st September 2009, 22:52
I highly recommend the BitRock installer. Checkout:

http://bitrock.com/

It has been mentioned on this forum several times, and everyone seemed happy with it. They provide open source (free) versions of their installer or all of the Qt supported platforms.

Why use an installer? Well, first they give your application an even more professional look and fee. But more importantly, they allow you the opportunity to create a really perfect install for your application. You may not get your install to work perfectly the first time but you can play with the install until you have a perfect install. And all of this for free.

The other suggestion give here plus the BitRock installer will give you that perfect professional install. Your users will love it.

Happy coding...

Gary