Install MinGW 4.4, Qt library 4.8.4, and Qt Creator on windows

Source: Internet
Author: User

To implement QT development, you must first install QT library and QT creator. QT Library provides the header file, static Link Library, and dynamic link library for the QT program. QT creator is the IDE used for programming, provides multiple functions such as GUI rendering, code writing, and program debugging.
Qt has been divided into commercial and open-source versions. The commercial version provides users with a second-level dynamic library, which can be directly installed and used, but requires the cost to purchase the license, the open-source version complies with the GPL protocol and provides the source code. You must compile the source code to produce dynamic library files. Since Nokia abandoned meego and dismissed its QT Development Team, the commercial version of QT has moved its website to qt.digia.com, while open-source versions have moved to qt-project.org.

Download QT Library

The download URL of QT library is http://qt-project.org/downloads. this document uses 4.8.4 and optional QT library, which can be divided into mingw, vs 2008, vs 2010, Linux/X11, Mac, embedded Linux, and Win CE, the main differences are compiler, development environment, and operating system. Among them, mingw and vs 2008/2010 are all running on the Windows platform. The major difference between these versions is the compiler and the IDE environment. mingw is a free compiler, on Windows platform, the GCC compiler function is provided.
Mingw of Library supports the use of mingw as the source code compiler. This article will mainly introduce the installation process of QT library in this way.

Install mingw

For the download of mingw, I would like to mention it here, because QT 4.8.4 requires the use of the gcc4.4 version of mingw, which is relatively old and not very easy to find online, there is a link to the Nokia website. After downloading the package, decompress it to drive C or a specified directory.

Install and compile Qt library
Next, start to install Qt library, as long as you follow the prompts step by step, a dialog box will pop up in the middle, you need to select the mingw installation path, this is the above mentioned mingw decompression path, then wait patiently. The installation dialog box is displayed. However, this is not the end yet. You also need to compile the installed Qt library. As mentioned above, Qt library is divided into two versions: open-source and commercial. Here we download the open-source version, which is essentially the source code and some static libraries of Qt library, if you want to run it completely, you need to compile it by entering the Start Menu> program> Qt by Digia v4.8.4
(MinGW OpenSource)-> Qt 4.8.4 (Build Debug Libraries) and follow the prompts to perform step-by-step operations. Then mingw starts to compile the source code of Qt library, it takes about a long time (depending on the configuration of the PC), and the compilation is prompted.

Note: If the MinGW installed is not in gcc4.4, many strange problems may occur. For example, if a macro is not defined and a header file cannot be found, you must use the MinGW package mentioned above.

Install Qt Creator
The download path of Qt Creator is also http://qt-project.org/downloads. the installation process of Qt Creator is relatively simple. The more complex one is to select the compiler and debugging path. In the menu bar, select the tool> compiler path (usually in the bin \ gw.20.cmd.exe directory of the mingw directory) select the qmake path and version number of Qt (qmake is usually in Qt \ 4.8.4 \ bin \ qmake.exe ).
Finally, select the "Kit" tab, click the "add" button to create a new compilation setting item, and select the compiler and Debuger as prompted (usually in the bin \ gdb.exe in the mingw directory), Qt version number, set, click application, and finally don't forget to set this new compilation option to defualt.

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.