Release standalone application - static



  • Hey, I installed static Qt 5.3.1, but now I don't know how to use it... I added in .pro file config += static and then in designer ran release, but it still asking me for .dll files...

    Also if I am informed right, statically build Qt should have only .exe file... I can not find that file anywhere... I have only Qt 5.3.1 which was installed with Qt installer before I did static build...

    I need instructions how to make my application standalone, without asking me for .dll files... I am using MSVC as compiler...

    I found these instructiosn but I don't really understand them... I added CONFIG += static and ran qmake in QtCreator and no idea where and how to make nmake, cd release...

    Build a static application

    Modify the .pro file of the project by adding an option for static linking.
    CONFIG += static

    Using Microsoft Tools
    To build the Qt project as a standalone executable file run qmake and nmake. After that you should execute mt.exe to embed a manifest inside the application to avoid error such as missing MSVCP90.dll when the application is started on other computers.

    qmake Hello.pro
    nmake release
    cd release
    mt.exe -manifest Hello.exe.manifest -outputresource: Hello.exe;1



  • Maybe I did something wrong at building static as well... Here are my steps...

    1. Download Qt source, Install Qt with installer
    2. Extract source to C:\Qt\Static
    3. Open visual studio cmd
    4. Cd to extracted source (C:\Qt\Static\Qt5.3.1)
    5. configure.bat -static -opensource -no-opengl -no-angle -audio-backend -nomake tests -nomake examples
    6. Run jom
    7. Install Visual Studio Add in for Qt5

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.