Frank
Frank

Reputation: 2696

make stand alone executable of qt

I have made an QT programm that I want to be able to run on another computer that doesnt have QTsdk installed on it. So I guess I have to make an executable file. Unfortunately I have abolutely no experience with this. Can somebody tell me how to do this in simple words?

I work have made the programm in Qt Creator 2.4.1 based on Qt 4.7.4 (32 bit) on a windows 64bit computer.

Upvotes: 3

Views: 4411

Answers (3)

Stephen Chu
Stephen Chu

Reputation: 12832

Use Dependency Walker to find out what Qt and other runtime (MinGW) DLLs are required in your app. Copy those DLLs to the same folder as your app. Zip the folder and distribute the archive.

Upvotes: 3

cmannett85
cmannett85

Reputation: 22346

On answer mentions statically linking your executable with the Qt libraries, this is very convenient as it means you only have a single file to deal with (your exe) - BUT because of Qt's licensing, it also means you have to buy a commercial license for your application.

Assuming you are not modifying Qt's source code, the way round this is to ship Qt's runtime libraries (the .dll files it needs for runtime linking) with your application. This is how the vast majority of programs on your machine work anyway because it has lots of other advantages too.

Upvotes: 3

jalone
jalone

Reputation: 2063

if you mean statical linking
http://doc.qt.nokia.com/4.7-snapshot/deployment.html#static-vs-shared-libraries

then there are tons of tutorials on the web
http://www.qtcentre.org/wiki/index.php?title=Building_static_Qt_on_Windows
http://www.formortals.com/how-to-statically-link-qt-4/

it's just about configuring your qmake file with static flags.

Upvotes: 1

Related Questions