How to run a Qt program without installing Qt?

I wrote a program with Qt5.3.1 and ran it on my development machine, where it works fine. I copied all the necessary .dll files to the folder where my .exe is located. It:

  • Qt5Widgets.dll
  • Qt5Network.dll
  • Qt5Gui.dll
  • Qt5Core.dll
  • icudt51.dll
  • icuin51.dll
  • icuuc51.dll
  • libgcc_s_dw2-1.dll
  • libwinpthread-1.dll
  • libstdc ++ - 6.dll

Now I want to run this program on a machine that does not have Qt. How should I do it? Users will not need to install an IDE just to use the program, right?

Details of the development machine, where it works:

  • Windows 8
  • Qt 5.3.1

Deployment Platform:

  • Windows Vista li>
  • No Qt, but all the necessary .dlls are in place.

The errors I get are the first:

, Qt "windows". .

:

, Runtime . .

. , Qt5.3.1, . c:/Qt

+5
8

Qt SDK "windeployqt". DLL . . : https://doc.qt.io/Qt-5/windows-deployment.html.

, mingw53_32, "C:\example_qtapp":

QT_INSTALL_DIR\minqw53_32\bin\windeployqt.exe c:\example_qtapp
+2

This application failed to start because it could not find or load the Qt platform plugin "windows".

{QTSDK}/plugins/platforms/qwindows.dll {YOUR_EXE_DIR}/platforms/qwindows.dll.

+8

: , DLL Qt. , , , Qt5 LGPL. , LGPL LGPL 4.1.

: Qt5 Qt5 Windows., .

+6

,

Qt Qt C:\Qt\Qt5.2.1\5.2.1\mingw48_32\Plugins\\

qwindows.dll , ,

  • Qt5Widgets.dll
  • Qt5Network.dll
  • Qt5Gui.dll
  • Qt5Core.dll
  • icudt51.dll
  • icuin51.dll
  • icuuc51.dll
  • libgcc_s_dw2-1.dll
  • libwinpthread-1.dll
  • libstd++ - 6.dll
  • /qwindows.dll
+2

Qt DLL . Qt5Core.dll, Qt5Gui.dll , , , . DLL Qt Directory bin. LIBGCC_S_DW2-1.DLL, MINGWM10.DLL LIBSTDC++-6.dll, MinGW.

, dll plugins exe. DLL qico.dll qsvg.dll imageformats.

+1

Qt dlls , . , /dll IDE. , Visual Studio 2010 IDE, VS2010 Redistributable x86/x64 .

0

{QTSDK}/plugins , . qt.conf ( ) :

[Paths]
Plugins=plugins

Then run your program. I did the same on linux.

0
source

In the application folder, hold the SHIFT key and right-click. You will see - Open the command window here

  1. Click Open Command Window here.
  2. TYPE windeployqt.exe app_name.exe --parameters and HIT ENTER

Example: windeployqt.exe APP_NAME.EXE --release --no-translations --no-system-d3d-compiler --no-compiler-runtime -no-angle --no-opengl-sw

0
source

Source: https://habr.com/ru/post/1548706/


All Articles