Best source for MinGW
-
Ok so if I understand correctly, the former contains the compiler plus command line tools, whereas the latter is only the compiler. Additionally, I don't need any environment set up of the host machine. Just include the install folder in the PATH.
-
[quote author="astodolski" date="1357658760"]Ok so if I understand correctly, the former contains the compiler plus command line tools, whereas the latter is only the compiler. Additionally, I don't need any environment set up of the host machine. Just include the install folder in the PATH.[/quote]
Almost. You need to consider that the MinGW doesn't exist. It's OpenSource software, so different forks happen to exist, in parallel. As JKSH explained, there are at least two main "flavors" of MinGW: The original MinGW.org project and the MinGW-w64 project, both based on GCC/Gygwin and the latter originally forked off from the former. Also different people built MinGW with different compilers and/or compiler settings and/or custom patches and/or different libraries included. In my experience grabbing one of the widely-used "all-in-one" MinGW packages, as provided by TDM-GCC (or MinGW-builds) is the easiest way to get an up-to-date and working MinGW environment.
BTW: If you need to run "./configure" scripts and the like, you will also need MSYS in order to get a Linux-style Shell on Win32. This probably won't be needed for Qt Creator, but a lot of OpenSource tools need it.
-
[quote author="MuldeR" date="1357665184"][quote author="astodolski" date="1357658760"]Ok so if I understand correctly, the former contains the compiler plus command line tools, whereas the latter is only the compiler. Additionally, I don't need any environment set up of the host machine. Just include the install folder in the PATH.[/quote]
Almost. You need to consider that the MinGW doesn't exist. It's OpenSource software, so different forks happen to exist, in parallel. As JKSH explained, there are at least two main "flavors" of MinGW: The original MinGW.org project and the MinGW-w64 project, both based on GCC/Gygwin and the latter originally forked off from the former. Also different people built MinGW with different compilers and/or compiler settings and/or custom patches and/or different libraries included. In my experience grabbing one of the widely-used "all-in-one" MinGW packages, as provided by TDM-GCC (or MinGW-builds) is the easiest way to get an up-to-date and working MinGW environment.
BTW: If you need to run "./configure" scripts and the like, you will also need MSYS in order to get a Linux-style Shell on Win32. This probably won't be needed for Qt Creator, but a lot of OpenSource tools need it.[/quote]
I tried adding the MinGW-builds as a tool chain to the Qt SDK to try things out. The compile output window shows builds fall down immediately.
6:26:01: Running build steps for project example...
16:26:01: Starting: "C:\mingw\bin\mingw32-make.exe" clean
qtcreator_ctrlc_stub: Command line failed: C:/mingw/bin/mingw32-make.exe clean
16:26:01: The process "C:\mingw\bin\mingw32-make.exe" crashed.
16:26:01: Configuration unchanged, skipping qmake step.
16:26:01: Starting: "C:\mingw\bin\mingw32-make.exe"
qtcreator_ctrlc_stub: Command line failed: C:/mingw/bin/mingw32-make.exe
16:26:01: The process "C:\mingw\bin\mingw32-make.exe" crashed.
Error while building project example (target: )
When executing build step 'Make'I have the compiler however located at:
C:\mingw\bin\x86_64-w64-mingw32-g++.exe
-
[quote author="Lukas Geyer" date="1357632541"]"MinGW-builds":http://sourceforge.net/projects/mingwbuilds/. This is also used by the QtProject CI and will be the preferred choice for Qt5.[/quote]
I installed the build you pointed to. I then proceeded to install Qt 4.8.4 for MinGW. The installer when asked for a location of the compiler complained with a dialog box stating: There is a problem with your MinGW installation: The installer could not find a valid c:\mingw\include\w32api.h (only versions with W32API 3.13 are supported)
There's not even a w32api.h file present in the include folder.
Any help appreciated.
-
There should be a w32api.h in mingw/i686-w64-mingw32/include.
Be aware that MinGW 4.4, which is used to build the official binaries, is not binary compatible with MinGW 4.7 which you have downloaded from MinGW-builds. This means that you will have to compile Qt with the compiler you've just downloaded. You cannot use the official libraries with it.
Fortunately this is no rocket science. Just grab the sources, <code>configure</code> and <code>mingw32-make</code>.
I recommend to not revert to MinGW 4.4 just to be able to use the official binaries.
-
[quote author="Lukas Geyer" date="1357731905"]
I recommend to not revert to MinGW 4.4 just to be able to use the official binaries.[/quote]
Can you elaborate with a few more sentences on this statement?If I understand yours and MuldeR's comments correctly, we could end up with a 32 bit version of the MinGW 64 bit version. Also version 4.7.2 of the different branches might show different behaviour in performance and bugs. Are there known differences already? Is the scenario as dark as one might imagine?
-
[quote author="Lukas Geyer" date="1357731905"]There should be a w32api.h in mingw/i686-w64-mingw32/include.
Be aware that MinGW 4.4, which is used to build the official binaries, is not binary compatible with MinGW 4.7 which you have downloaded from MinGW-builds. This means that you will have to compile Qt with the compiler you've just downloaded. You cannot use the official libraries with it.
Fortunately this is no rocket science. Just grab the sources, <code>configure</code> and <code>mingw32-make</code>.
I recommend to not revert to MinGW 4.4 just to be able to use the official binaries.[/quote]
I agree with the suggestion of not reverting to MinGW 4.4.
So then can I assume that the updated Qt libraries are an upgrade to the Nokia supplied SDK?
-
[quote author="koahnig" date="1357734990"][quote author="Lukas Geyer" date="1357731905"]
I recommend to not revert to MinGW 4.4 just to be able to use the official binaries.[/quote]
Can you elaborate with a few more sentences on this statement?[/quote]
I see mainly two problems with MinGW 4.4 (as used by the official builds for Qt4); it is based on MinGW.org, which means inferior Windows API support, which is way better on MinGW-w64, and it is based on GCC 4.4, which is heavily outdated, also in terms of quality. For instance using it as a C++11 compiler will most probably result in pure frustration, because you are welcomed with segmentation faults all over the place.Having no official binaries for MinGW 4.7.2 should not be a reason to use MinGW 4.4 instead, because compiling Qt with MinGW 4.7.2 is way less of an issue than using MinGW 4.4.
[quote author="koahnig" date="1357734990"]If I understand yours and MuldeR's comments correctly, we could end up with a 32 bit version of the MinGW 64 bit version.[/quote]We will as it is.
The recommended packages are mingw-builds, SJLJ exceptions, POSIX threading for either 32 bit or 64 bit (GCC 4.8 will bring SEH exception support).
Be aware that although it reads MinGW-w64, it is not related to 64 bit. mingw-builds for instance offers builds of MinGW-w64 for both, x86 and x64 host beeing capable to either produce x86 or x64 code, including cross-compilation (for example building x86 applications on a x64 host and vice versa).
[quote author="koahnig" date="1357734990"]Also version 4.7.2 of the different branches might show different behaviour in performance and bugs. Are there known differences already?[/quote]Yes, although all of them use GCC and the MinGW-w64 runtime, they do build for instance GCC differently, with differing optimizations or patches included, cross-compilation options enabled or disabled, features like OpenMP included or excluded, a different threading model selected; even within one distribution, like mingw-builds, there are different "revisions":http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.7.2/.
A summary has been made during the distribution selection process, which can be found "here":http://qt-project.org/wiki/MinGW-64-bit.
-
[quote author="astodolski" date="1357735005"]So then can I assume that the updated Qt libraries are an upgrade to the Nokia supplied SDK?[/quote]There are no Nokia SDKs any longer; they are now provided by the QtProject.
Official Qt4 libraries are still based on MinGW 4.4 (and I have no information that this is going to change), Qt5 libraries will be based on MinGW 4.7.2 from mingw-builds when they are released (planned for Qt 5.0.1).
-
[quote author="Lukas Geyer" date="1357742415"][quote author="koahnig" date="1357734990"][quote author="Lukas Geyer" date="1357731905"]
I recommend to not revert to MinGW 4.4 just to be able to use the official binaries.[/quote]
Can you elaborate with a few more sentences on this statement?[/quote]
I see mainly two problems with MinGW 4.4 (as used by the official builds for Qt4); it is based on MinGW.org, which means inferior Windows API support, which is way better on MinGW-w64, and it is based on GCC 4.4, which is heavily outdated, also in terms of quality. For instance using it as a C++11 compiler will most probably result in pure frustration, because you are welcomed with segmentation faults all over the place.Having no official binaries for MinGW 4.7.2 should not be a reason to use MinGW 4.4 instead, because compiling Qt with MinGW 4.7.2 is way less of an issue than using MinGW 4.4.
[quote author="koahnig" date="1357734990"]If I understand yours and MuldeR's comments correctly, we could end up with a 32 bit version of the MinGW 64 bit version.[/quote]We will as it is.
The recommended packages are mingw-builds, SJLJ exceptions, POSIX threading for either 32 bit or 64 bit (GCC 4.8 will bring SEH exception support).
Be aware that although it reads MinGW-w64, it is not related to 64 bit. mingw-builds for instance offers builds of MinGW-w64 for both, x86 and x64 host beeing capable to either produce x86 or x64 code, including cross-compilation (for example building x86 applications on a x64 host and vice versa).
[quote author="koahnig" date="1357734990"]Also version 4.7.2 of the different branches might show different behaviour in performance and bugs. Are there known differences already?[/quote]Yes, although all of them use GCC and the MinGW-w64 runtime, they do build for instance GCC differently, with differing optimizations or patches included, cross-compilation options enabled or disabled, features like OpenMP included or excluded, a different threading model selected; even within one distribution, like mingw-builds, there are different "revisions":http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.7.2/.[/quote]
Thanks Lukas for the excellent summary. Looks a like a mess we are ending up with MinGW. Especially when the compiler flavours show differences.
[quote]
A summary has been made during the distribution selection process, which can be found "here":http://qt-project.org/wiki/MinGW-64-bit.[/quote]
Excellent. Thought about something like this is required.However, we end up with a similar situation as with the different names of MinGW distributions. The wiki name says clearly "MinGW-64-bit", but the article contains information about the recommended 32 bit version. I do not know if the page existed already when I was looking for MinGW 32 bit version in last autumn. Even, if it was already available, I would not have looked there for 32 bit information. So I ended up with downloading the compiler from original, but out-dated MinGW.org page. :(
I am suggesting a name change of that wiki page. -
The good thing is that all of those flavours should generate compatible code (as long as you stick to the same exception and threading model) and as you are required to deploy Qt with your application anyway on Windows you are theoretically free to choose your flavour as long as it works for you. There will be, however, just one flavour which is officially supported, and I second the selection of mingw-builds.
Yes, the name is quite misleading, it should probably read MinGW for Qt5 or just MinGW. What do you think?
-
[quote author="Lukas Geyer" date="1357742639"][quote author="astodolski" date="1357735005"]So then can I assume that the updated Qt libraries are an upgrade to the Nokia supplied SDK?[/quote]There are no Nokia SDKs any longer; they are now provided by the QtProject.
Official Qt4 libraries are still based on MinGW 4.4 (and I have no information that this is going to change), Qt5 libraries will be based on MinGW 4.7.2 from mingw-builds when they are released (planned for Qt 5.0.1).[/quote]
I understand there is no SDK any longer - certainly not the one that was from Nokia. Installing Qt along with a MinGW compiler was initially done using the SDK 1.1 which was available here. Every subsequent revision to the Qt library was just that. Meaning if you were to install the updated library after having the SDK, the compiler remains at version 4.4 which is included in the SDK. If someone were to install Qt 4.8.4 for MinGW for the first time, then locate the latest MinGW compiler, you can see that it is not a smooth set-up. There are obvious issues which I am seeing. This is why I asked if the revision path with the updated library had as a basis the original SDK.
-
[quote author="Lukas Geyer" date="1357746695"]
Yes, the name is quite misleading, it should probably read MinGW for Qt5 or just MinGW. What do you think?
[/quote]
There is also a parenting folder called MinGW. When you go onto this it actually allows its creation, because a wiki is not existent.
So either- to place some more general information there :)
- to add a sentence indicating that there more detailed information under MinGW-64-bit for 32 bit :(
Rename the MinGW-64-bit page in all cases. MinGW for Qt5 is as misleading, since the information is also valid for Qt4. How about MinGW-builds(current_recommendation_for_Qt) ?
This would leave room in case of odds and another MinGW gets selected at the end. Otherwise MinGW-builds sounds good to me.
The first sentence of the wiki page should be then:
"This is mainly about selecting the right MinGW package for Qt 5." -
[quote author="astodolski" date="1357748154"]... If someone were to install Qt 4.8.4 for MinGW for the first time, then locate the latest MinGW compiler, you can see that it is not a smooth set-up. There are obvious issues which I am seeing. This is why I asked if the revision path with the updated library had as a basis the original SDK.[/quote]I'm still not quite sure what you mean, but i'll give it a try anyway. ;-)
The MinGW used to build Qt4 for the Nokia SDK is the same which is used to build the Qt4.8.x library packages now (at least as far as I know).
The library packages should warn you if you try to use it with an incompatible version, for example that latest MinGW compiler; you obviously have already experienced that, in form of "Only versions of W32API 3.13 are supported.".
-
[quote author="koahnig" date="1357748774"]Rename the MinGW-64-bit page in all cases. MinGW for Qt5 is as misleading, since the information is also valid for Qt4. How about MinGW-builds(current_recommendation_for_Qt) ?
This would leave room in case of odds and another MinGW gets selected at the end. Otherwise MinGW-builds sounds good to me.
The first sentence of the wiki page should be then:
"This is mainly about selecting the right MinGW package for Qt 5."[/quote]
I would say:- The content from "MinGW 64 bit":http://qt-project.org/wiki/MinGW-64-bit is moved to "Category:MinGW":http://qt-project.org/wiki/Category:MinGW
- "MinGW 64 bit":http://qt-project.org/wiki/MinGW-64-bit is redirected to "Category:MinGW":http://qt-project.org/wiki/Category:MinGW to not break any existing links
- The content from "Tools > MinGW":http://qt-project.org/wiki/MinGW is merged with "Category:MinGW":http://qt-project.org/wiki/Category:MinGW
- "This is about selecting the right MinGW package for Qt 5." is removed altogether.
- The section "Building Qt" is renamed to "Building Qt5" and a section "Building Qt4" is added.
This way there is a centralized article which covers the topic MinGW, which is the preferred distrubtion, what are the differences and how to use it to build Qt and its dependencies.
-
[quote author="Lukas Geyer" date="1357753210"]I would say:
- The content from "MinGW 64 bit":http://qt-project.org/wiki/MinGW-64-bit is moved to "Category:MinGW":http://qt-project.org/wiki/Category:MinGW
- "MinGW 64 bit":http://qt-project.org/wiki/MinGW-64-bit is redirected to "Category:MinGW":http://qt-project.org/wiki/Category:MinGW to not break any existing links
- The content from "Tools > MinGW":http://qt-project.org/wiki/MinGW is merged with "Category:MinGW":http://qt-project.org/wiki/Category:MinGW
- "This is about selecting the right MinGW package for Qt 5." is removed altogether.
- The section "Building Qt" is renamed to "Building Qt5" and a section "Building Qt4" is added.
This way there is a centralized article which covers the topic MinGW, which is the preferred distrubtion, what are the differences and how to use it to build Qt and its dependencies.[/quote]
That is certainly fine with me. That is more I meant with the first option. The second option was for minimum effort. ;) -
[quote author="Lukas Geyer" date="1357750738"]
The MinGW used to build Qt4 for the Nokia SDK is the same which is used to build the Qt4.8.x library packages now (at least as far as I know).
[/quote]
Consider if you will, If I had a clean machine and wish to install Qt, I grab the 4.8.4 library built for MinGW. Not knowing which version of the compiler to use I assume to get the latest. That's what got me to this point. Nobody would know that a down rev of the compiler is to be obtained if one isn't already installed. If you are starting with the SDK that's a given is it not?
[quote]
The library packages should warn you if you try to use it with an incompatible version, for example that latest MinGW compiler; you obviously have already experienced that, in form of "Only versions of W32API 3.13 are supported.".[/quote]Yes, and the solution is only realized after some "digging". This is why it looks as if the library updates are replacement for what was in the SDK.
-
Got it.
[quote author="astodolski" date="1357764188"]Nobody would know that a down rev of the compiler is to be obtained if one isn't already installed. If you are starting with the SDK that's a given is it not?[/quote]I think I have to disagree on this one. The required compiler is explicitly stated (for instance MinGW 4.4, MSVC2008 or MSVC2010).But I agree that the download page can be quite misleading, especially as the terms 'libraries' and 'SDK' are now used synonymously, whereas they mean different things for Qt5 and Qt4.
Feel free to leave a comment at https://bugreports.qt-project.org/browse/QTWEBSITE-494
-
[quote author="Lukas Geyer" date="1357815665"]The required compiler is explicitly stated (for instance MinGW 4.4, MSVC2008 or MSVC2010).
[/quote]Yes it is.
[quote]
But I agree that the download page can be quite misleading, especially as the terms 'libraries' and 'SDK' are now used synonymously, whereas they mean different things for Qt5 and Qt4.Feel free to leave a comment at https://bugreports.qt-project.org/browse/QTWEBSITE-494[/quote]
Now that this thread I started sort of blew up - in a good sense - what in your opinion (or any one else's) is a recommended path to setting up an IDE (Qt library + Qt Creator)?
Choice 1:
SDK 1.1: Still available from Nokia (at least until Qt Project releases its own) and updating Qt library as needed
Choice 2:
Getting current Qt library, Creator, appropriate compiler.
I posted a comment regarding the download page "here":https://bugreports.qt-project.org/browse/QTWEBSITE-494?focusedCommentId=192380#comment-192380
-
[quote author="astodolski" date="1357825700"]Now that this thread I started sort of blew up - in a good sense - what in your opinion (or any one else's) is a recommended path to setting up an IDE (Qt library + Qt Creator)?
Choice 1:
SDK 1.1: Still available from Nokia (at least until Qt Project releases its own) and updating Qt library as needed
Choice 2:
Getting current Qt library, Creator, appropriate compiler.[/quote]
Choice 1 really doesn't offer much at all -- You'll need to upgrade the Qt library (to Qt 4.8.4) AND Qt Creator, so you end up almost doing Choice 2 anyway.The method with the least steps involved (for Qt 5.0.0 on Windows) is:
Download and install Windows SDK 7.1 (32-bit) from http://download.microsoft.com/download/F/1/0/F10113F5-B750-4969-A255-274341AC6BCE/GRMSDK_EN_DVD.iso (it's ~570 MB)
Restart your computer
Download and install Qt libraries 5.0.0 for Windows (VS 2010 406 MB) from http://qt-project.org/downloads (This already includes Qt Creator 2.6.1)
Start writing programs