Publish the QT program on Windows

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.