[Reprinted] the QT program is released in the Windows mingw.

Source: Internet
Author: User

QtProgram in WindowsReleaseThis is the content to be introduced in this article. Let's talk about it later. Let's look at the content first.QtThe meaning in manual is clear. The following is what I wrote after my own understanding and experiment.QtThe document is easy to understand.

The following does not involve staticCompile, Only contains dynamicCompile(That isQtBy default) only releases in the mingw compiling environment

First, we need to generate the release executable program (app.exe) (many people complain that a small program requires a dynamic library of more than 100 MB, because the debug program is used)

Then, you need to put the executable file and the required dynamic library in the same folder (these are all in the compiling library, that is, the qt4.x. X version ):

Myprogram.exe

Mingwm10.dll

Libgcc_s_dw2-1.dll

Qtcore4.dll

Qtgui4.dll

If you do not need other plug-ins, you can release the program. However, many people complain that images in JPG, GIF, or BMP formats cannot be displayed, because QT supports PNG native, other formats must be supported by plug-ins (the plug-ins are under the % qtdir %/plugins \ imageformats directory)

You only need to copy the required plug-in to the imageformats directory under the directory where the executable program is located.

Imageformats \ q00004.dll

Imageformats \ qgif4.dll

Of course, there are other image formats that can be copied if needed.

Similarly, if your program requires support for gb2312 and GBK encoding (Chinese encoding is used ), copy the corresponding plug-ins under the % qtdir % \ plugins \ codecs directory to the codecs directory where the executable program is located.

Codecs \ qcncodecs4.dll

The codecs directory contains codes from other countries, which can be added as needed.

Suggestion: Check the Plugins directory under the QT installation directory to familiarize yourself with the plug-ins.ReleaseWhich programs are required.

Now, the program canRelease. You can also use NSIs to create an installation package.



Related Article

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.