MinGW

From qtnode

Jump to: navigation, search

Website: http://mingw.org

Taken verbatim from the MinGW site:

MinGW: A collection of freely available and freely distributable Windows specific header files and import libraries combined with GNU toolsets that allow one to produce native Windows programs that do not rely on any 3rd-party C runtime DLLs.

If you wish to install Qt and MinGW with a minimum of fuss then you may want to download the Qt self-extracting installer from Trolltech which includes a working MinGW installation.

To install MinGW manually and compile Qt from the source package you'll need the following MinGW packages :

GCC core 3.4.2
GCC g++ 3.4.2
MinGW runtime 3.9
win32 API 3.6
binutils 2.15.91
mingw-make 3.80.0

To install the MinGW packages :

  • Extract all of the packages into a single directory.
    Unfortunately Windows does not come with the tar and gzip utilities so users may have to use third party tools such as Winzip to extract the files.
  • Add the MinGW bin directory to the Path environment variable.
    Setting environment variables in Windows XP

MSYS

MSYS is a Minimal SYStem to provide POSIX/Bourne configure scripts the ability to execute and create a Makefile used by make.

http://www.mingw.org/msys.shtml

It is not necessary to install MSYS if you only intend to use qmake for your projects. Currently MSYS is not properly supported by Qt although it will work if you take note of the MSYS backslash problems. MSYS support is planned for Qt 4.3.

Note When compiling Qt, you may encounter an error if you have some of the MSYS tools in your path (sh.exe). See MSYS backslash problems for more info on this.


To compile using MinGW after it has been installed correctly:

Windows XP
You'll first need a Makefile:

Qmake -project -o filename.pro
Qmake

Then, use the command

mingw32-make

to build your project. It should output the EXE and the associated source files to the \debug or \release folder depending on what is set in your .pro file.
Personal tools