How to deploy my application using Qt-Creator?

前端 未结 5 642
一个人的身影
一个人的身影 2021-02-01 21:57

I\'m trying to deploy my simple Qt project like a hello world.

I build it successfully and can also execute it on Qt-Creator. However, I can\'t execute the binary direc

相关标签:
5条回答
  • 2021-02-01 22:05

    If you don't want to have dependencies with qt/mingw dlls you should compile qt statically as explain here: http://qt.nokia.com/doc/4.6/deployment-windows.html#static-linking.

    0 讨论(0)
  • 2021-02-01 22:13

    copy all the qt dlls to your windows directory directly "C:\Windows\" and there will be no qt dll error 100% working and simple nb: do not create a qt dll folder in your windows directory post them as they are

    0 讨论(0)
  • 2021-02-01 22:15

    You also need to deploy the MINGW runtime dll (mingwm10.dll). This file is located in your Qt\2009.5\mingw\bin directory.

    Also pay attention to whether your application is compiled in debug mode or release mode. I just made the test with an hello world type application and Qt Creator. In the debug folders, I copied libgcc_s_dw2-1.dll, mingwm10.dll, QtCored4.dll and QtGuid4.dll and it works.

    Pay attention to the d in dll names, which stands for debug: QtCore d 4.dll.

    See Qt 4.6: Deploying an Application in Windows. For Qt 5, check this page.

    0 讨论(0)
  • 2021-02-01 22:21

    You may also use static linking, just add this line into the .pro file:

    QMAKE_LFLAGS += -static-libgcc

    I found the solution here and successfully tested on WinXP with QT creator 2.2.0

    0 讨论(0)
  • 2021-02-01 22:21

    Try running dependency walker on it (http://dependencywalker.com/) to see which dlls are missing?

    Generally, you won't need to move those Qt libraries into your local folder since the Qt installation should've added those libraries into your path.

    One possibility is that you built debug, and the Qt debug dlls are named differently

    0 讨论(0)
提交回复
热议问题