QT Learning 2--qt Release under Window

Source: Internet
Author: User

Most of the time, we are using QT Creator compiled to run the program we wrote, the program can start normally, but when we directly click on the debug EXE file, the program fails to start, will be prompted missing some DLL files, this is why?

Yes, we have written the QT program, need to use a lot of QT library, but these libraries are in the form of dynamic link library, loaded in the program, if using QT Creator, it will help us to link those needed dynamic link library to the program, but if we manually click EXE file, Then those DLL files cannot be loaded. How to solve it?

There are 2 ways to solve this problem:

1. In the form of an environment variable, place the required DLL file under a folder, then in the environment variable, add the path variable (if there is no path variable), put the address of the folder into the PATH environment variable, so that when the program starts, it can link to those DLL files.

2. Put the required DLL files directly into the QT program directory that you have written. How do I know what DLL files are needed? This can be by clicking on your own EXE file, it will naturally prompt you to missing that DLL, and then add the corresponding DLL file.

When I use the VS2010 compiler and the corresponding QT version, that's it.


When I use Mingw47_32 and Qt5.0.2, when I add up all the DLL files that I have prompted, I get the following error message:

This application have requested the Runtime to terminate it on an unusual.

The reason for this is that the DLL has not been added properly. You need to set up the platforms directory in the directory, and put Qminimal.dll and Qwindows.dll in the platforms two files (all two files under Plugins folder, the other several DLLs are under the bin. ) program to run. The above two DLL files are required because the program runs under the Windows platform.

If not, you also need to add the LibEGL.dll file in the program directory


Experience: With QT Writing program, if it contains a DLL, it is very large, usually more than 10M, really extravagant.



QT Learning 2--qt Release under Window

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.