MinGW compilation Qt4 under Windows

Source: Internet
Author: User

It's not really blowing, this problem is torturing me all day ... A few days ago reproduced an article on the "ECLIPSE+QT Development environment settings" and "ECLIPSE+MINGW+QT Development environment settings" Two pieces of article, which tells the QT open source version Qt-win-opensource-4.x.x-mingw.exe Installation steps under Windows, but my is qt-win-commercial-src-4.x.x.zip, a meal Baidu, Google ... The results are also on the QT Open source version of the introduction, how the MINGW development environment compiled into today's topic.

Install MinGW or DEV-CPP, set environment variables, here I will not say more, you can see the reproduced articles, follow the steps to install the settings.
It is worth mentioning that the environment variable qmakespec, the value is win32-g++, of course, you can also use the command to specify the compiler at compile time.

Compiling QT4 with MinGW is the focus, of course QT4 is Qt-win-commercial-src-4.3.1.zip version here.
Install Qt-vsintegration-1.3.1.exe first so that QT4 will get licencse at the time of installation.
Open the cmd command prompt and CD to the extracted Qt-win-commercial-src-4.3.1.zip directory.

Actually compiling QT under MinGW, execute the following command:

Configure-platform win32-g++
Mingw32-make

of course, in fact, in the mingw32-make of the time is not able to pass ...
Tip error: Multiple target patterns. Stop.
Cause of error: Multiple schema targets exist in the target segment of the static mode rule;

There is a study here ... When you execute the Configure command, you can compile it statically and add -static . But the problem can't be solved ....
Casually mentioned below, VC2005 platform, when compiling QT, execute the command as follows:

Configure-platform win32-msvc2005
NMAKE SUB-SRC

Problems can not be solved, and finally in the search for the answer, which may be the QT compilation bug, in fact, do not set the include and LIB environment variables.
The following naming can be done by compiling the ~

Set lib =
Set include =
DEL/S qconfig.h
Configure-debug-and-release
Mingw32-make

http://cool.worm.blog.163.com/blog/static/64339006200942705153604/

MinGW compilation Qt4 under Windows

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.