简体   繁体   中英

Qt C++ Stand alone executable in Windows

I want to make my Qt C++ program a stand alone single application. By the way, I am using Qt creator 2.2.1 which is based on Qt 4.7.4. I followed the instructions from http://www.formortals.com/how-to-statically-link-qt-4/ to statically link the libraries. I did not know where to find the configure.exe in the QtSDK folder so I downloaded "qt-everywhere-opensource-src-4.7.3" and followed the instructions.

I was unsure in Step 4 because the windows Qt options do not look similar. Its not a path to a folder but rather a path to qmake location and I am not sure what to choose for that option.

If anyone knows how to create the program as a stand alone without needing any dlls and can help me out, I would really appreciate it.

Thanks

Regarding the step 4 you mentioned, in QtCreator you need to point the qmake executable you will find it in the build tree (where you built Qt statically) in the bin folder.

I guess if you have problems on step 4 you should have built the static version of Qt , you've done 95% of the work !

The moment QtCreator will accept the qmake you made , you will just have to select this version use any wizard to get you first app, then add CONFIG += static to you .pro file.

Here some Qt tutorial just in case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM