How to create executable file for a Qt Application?

前端 未结 4 1340
温柔的废话
温柔的废话 2020-12-13 15:17

I\'ve been searching on the internet for some useful and clear information about this, it\'s annoying that such a trivial thing is so hard to do.

What I need is to c

4条回答
  •  心在旅途
    2020-12-13 15:34

    Basically you have to look for mingw subfolder deep into qt tree, where qt utilities reside, and copy needed dll's.

    These are the steps I follow, based upon QT 4.7.4, for packaging the application with correct shared libraries.

    1. Let's say you've installed QT under c:\qtsdk
    2. Open your project, and compile it in release mode.
    3. Go to this directory: C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin -- it contains all shared libraries. Debug libraries end with a "d" -- frex, QtCore.dll is release version, while QtCoreD.dll is debug version
    4. Copy at least these files into your release directory (where your .exe lies)

      • mingwm10.dll
      • libgcc_s_dw2-1.dll
      • QtCore4.dll
      • QtGui4.dll

      I just built, tested and deployed a dummy project this way.

提交回复
热议问题