User Tools

Site Tools

blog:2021-02-22_qt_qt_application_build_with_necessary_dll



2021-02-22 Qt: Qt application build with necessary DLL

  • Some time we would like build the Qt application with necessary.
  • However, there is no simple way to do this.
  • When I direct lunch the exe file, it will show the errors as follows.

Method

  • I found a easy way to do this
  • Go to Project → Build Steps → Add Build Step
  • Find the exe file
  • Fill the file name and related modification in the Custom Process Step
  • For example:
    • I am using MinGW 64-bit, so D:\Qt\Qt5.14.2\5.14.2\mingw73_64\bin\windeployqt.exe in the command, note that the file folder is the Qt path that installed
    • Arguments is the exe file that we would link build
    • Since the target file is located debug sub-folder, so Working directory se as: %{buildDir}\debug
  • Rebuild the project, it will copy the necessary DLL in the debug folder
  • We can lunch the exe file directly without error.

TAGS

  • 249 person(s) visited this page until now.

Permalink blog/2021-02-22_qt_qt_application_build_with_necessary_dll.txt · Last modified: 2021/02/23 06:31 by jethro

oeffentlich