Static release and Dynamic Release are generally divided. The following describes only dynamic release,
1. Place the completed program in a unified file folder. This example is stored in the D: // Hello file folder,
Run the dig command in the upper-right corner to access the file created in the upper-right corner, and then run the following command:
Qmake-Project
Qmake
The mingw32-make // will generate a writable line file under the corresponding debug,
Mingw32-make-F makefile. Release // generate a writable row file under the corresponding release,
2. From the default installation of QT, put the EXE file under the generated release in the same folder as the following core files:
Hello.exe // self-written Program
Mingwm10.dll // exists in the bin of the mingw Compiler
Qtgui4.dll // exists in the bin of the QT Installer
Qtcore4.dll // exists in the bin of the QT Installer
3. If you post images with images, you need to do the following.
Create an imageformats directory (this name must be used) in the program folder, and copy all the DLL files under the plugin/imageformats directory under the QT directory. This completes the dynamic connection.
In this way, the program can run on other machines without QT installed.
Note: You need to test whether the released program has DLL dependencies on a system without QT installed. Because some other libraries, such as database connection SQL. dll... and other class libraries, are sometimes used.