tags:

views:

56

answers:

4

So I made a program using Qt Creator (Windows) and I compiled and ran it. It runs fine on my computer, but when I send it to a buddy of mine, he gets these errors:

The program can't start because libgcc_s_dw2-1.dll is missing from your computer. Try reinstalling the program to fix this problem.

The program can't start because mingwm10.dll is missing from your computer. Try reinstalling the program to fix this problem.

What can I do for the exe to basically be standalone, so I can just send the exe anywhere and be able to run it without error.

A: 

He needs to install the Qt library on his computer. Tell him to go here.

amphetamachine
That is plain wrong.
Christian Sciberras
+2  A: 

I guess static linking is what you want, see these Qt docs for a detailed explanation.

7vies
Alright, I did that, but when running `mingw32-make sub-src`, I get the following error.http://chiggins.pastebin.com/h0hQXYTN
Chiggins
Here it is stated that it is a bug:http://www.qtcentre.org/threads/31684-Problems-creating-Qt-4.6.3-static-with-MinGw, so you could try 4.7 version with -no-qt3support.
7vies
+2  A: 

The reason is that you used gcc in mingw to compile the program. You can either distribute those two dlls with your program (they're found in C:\Qt\YOUR_VERSION\mingw\bin) or do a static build as 7vies suggested.

Christian Sciberras
+1  A: 

He does not need to install Qt on his computer. You need to link the Qt libraries and build them into your executable, or include the necessary dll/library files with the distribution. You have to statically link to the Qt libraries/files/etc. Hope this helps.

JC Leyba