Compiling Qt Creator for Qt 5.0.1 for Windows 7 64 bit using MinGw...
I am developing an application in Qt Creator 4.8.1 for about a month. I was introduced to Qt about 2 months ago. I am a Mechanical Engineer & dont know how to compile Qt Creator 5 for my requirements. I tried searching on the internet but the language is a pretty difficult to me as I am not used to things like MinGw, make file, etc. I have a faint idea that MinGw is a compiler for Windows equivalent to GCC on Ubuntu. I also tried searching how to install that, but there are so many sources & versions. I am totally confused. I would like somebody to please give a step by step guide in installing MinGw compiler & compiling Qt Creator 5 on it. My configs are:
Windows 7, 64 bit.
I would also like to know the steps for Compiling on Ubuntu.
I tried searching in this forum but couldnt get the required information.
PS: I am not a Computer Science guy, so please try to answer in pure English.
Sorry for the stupidity but please try to understand my situation.
The latest Creator we ship is version 2.6.2, so I assume with "Qt Creator 5" you refer to the Creator shipped as part of the Qt 5 packages?
Easiest way to get mingw and creator set up is to use the mingw Qt 5.0.1 packages: They contain a mingw.
Note that you can not mix MSVC build libraries with Mingw applications (or the other way around). So for the windows Qt 5.0.0 MSVC2010 packages you absolutely need a MSVC 2010 compiler!
Sorry about that! I meant Qt Creator for version Qt 5.0.1
By "mingw Qt 5.0.1 packages" do you mean the Qt SDK i.e. "this":http://releases.qt-project.org/qt5/5.0.1/qt-windows-opensource-5.0.1-mingw47_32-x86-offline.exe?
It is only for 32 bit, right?
I want Qt Creator which can compile 32 & 64 bit applications using MinGw compiler (I dont want to depend on MSVC in any way).
I found somewhere that if I want Qt Creator 64 bit then I have to compile it myself using the MinGw compiler.
So can you please provide me with guide for doing this?
2 days yet no reply?
is this question so difficult?
& there are others as well waiting for an answer to this question (4 ratings for this question yet!).
I am requesting all the pro's out there to please help me out of this ignorance.
Thank You... :(
Creator found in the Qt 5.0.1 packages should work with any Qt 4 or Qt 5 version out there in the wild. It is not really for Qt 5.0.1, it is just packaged together with it. Sorry for the nitpicking:)
You need to compile creator for 64bit if you want to have a creator running in 64bit. That is pretty much the only reason to do that: Both the 32bit as well as the 64bit version of creator will happily build both 32bit as well as 64bit applications/libraries.
Get a mingw compiler for 64bit (the one in the qt 5.0.1 packages is 32bit only AFAIK, but then I am not a windows user), compile Qt with it.
Then in Creator you need to go to tools>options>Build & Run and register the newly build Qt version as well as the 64bit mingw there.
Finally copy the Kit you already have with 32bit mingw and a 32bit Qt, rename it and set the 64bit Qt version there as well as the 64bit mingw compiler.
@Tobias Thanks a lot for that answer. It was worth that wait after all.
regarding "Finally copy the Kit you already have with 32bit mingw and a 32bit Qt, rename it and set the 64bit Qt version there as well as the 64bit mingw compiler." :- I think you mean:
- copy the whole Qt SDK that I installed from the offline installer & rename it to say "Qt 5 64"
- replace the libs of mingw & Qt with that of mingw64 & Qt 64 bit that I compile.
All this was if I didn't compile Qt Creator 64 bit, right?
& what if I compiled Qt Creator 64 bit, would the same steps apply?
Also do you have any other suggestions for me (any standard links, articles, etc) that would help me in my endeavor? You see this is my 1st time at compiling manually. Until now I had depended on an IDE to compile for me...
Thanks again :)
@Tobias can you please reply about my querries?
I am having the exact same problem. Can someone please guide us here?
Which part of the problem are you having?
If you download and install "Qt 5.1.1 for Windows 32-bit (MinGW 4.8, OpenGL, 666 MB)" from http://qt-project.org/downloads you should get the Qt 5.1.1 libraries (32-bit), the Qt Creator 2.8.1 IDE, and the MinGW 4.8 compiler all set up automatically.
If you want the 64-bit libraries instead, you need an unofficial package. Download "x64-Qt-5.1.1+qtcreator-2.8.1" from http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/Qt-Builds/ and follow the instructions at the bottom of the page.
Thanks very much! It all works now :)
[quote author="danilo" date="1380209692"]Thanks very much! It all works now :)[/quote]Glad to hear! :) Happy coding, and welcome to the world of Qt!
I dont understand why traditionally there has been no official 64 bit build?
Neither Nokia did it nor is Digia doing it.
I am a bit skeptical about using non-official builds, that is why.
Here is a list of possible free (LGPL) packages (not sure about iOS though):
- MSVC 2012, ANGLE, 32-bit
- MSVC 2012, OpenGL, 32-bit
- MSVC 2012, ANGLE, 64-bit
- MSVC 2012, OpenGL, 64-bit
- MSVC 2010, ANGLE, 32-bit
- MSVC 2010, OpenGL, 32-bit
- MSVC 2010, ANGLE, 64-bit
- MSVC 2010, OpenGL, 64-bit
- MinGW 4.8, ANGLE, 32-bit
- MinGW 4.8, OpenGL, 32-bit
- MinGW 4.8, ANGLE, 64-bit
- MinGW 4.8, OpenGL, 64-bit
- Linux 32-bit
- Linux 64-bit
- Mac 32-bit
- Mac 64-bit
- Android on Windows, 32-bit
- Android on Windows, 64-bit
- Android on Linux, 32-bit
- Android on Linux, 64-bit
- Android on Mac, 32-bit
- Android on Mac, 64-bit
- ? iOS on Windows, 32-bit
- ? iOS on Windows, 64-bit
- ? iOS on Linux, 32-bit
- ? iOS on Linux, 64-bit
- iOS on Mac, 32-bit
- iOS on Mac, 64-bit
(Bold = Official package)
Don't forget, Digia supports 6 commercial platforms too: Solaris, Embedded Linux, Windows Embedded, Green Hills Software INTEGRITY, QNX, and VxWorks.
Each package takes a few hours to build. Each package needs to be tested by many people, over many days, to ensure that bugs are minimized. It's impossible to test so many packages, so Digia needs to choose a few to produce.
Windows is actually very well-covered, having 7 out of the 12 official packages. 32-bit packages work fine on 64-bit machines.
Sorry to not mention this previously but I was speaking about the MinGW version.
MinGW 4.8, OpenGL, 32-bit as you said is available, but no 64 bit official build.
[quote author="CAD_coding" date="1380981170"]Sorry to not mention this previously but I was speaking about the MinGW version.
MinGW 4.8, OpenGL, 32-bit as you said is available, but no 64 bit official build.[/quote]Yes, I know you were asking about the 64-bit MinGW build.
People can ask, "Why didn't Digia create an official 64-bit MinGW package?" or "Why didn't Digia create an official 64-bit MSVC 2010 package?" or "Why didn't Digia create an official 32-bit Mac package?"
The answer in engineering terms is, "Because Digia is managing the "Project Management Triangle":http://programsuccess.wordpress.com/2011/05/02/scope-time-and-cost-managing-the-triple-constraint/ "
There are 3 constraints:
- Scope: There needs to be official builds for every platform that Qt supports. Each release should also have a good number of new features and bug fixes.
- Time: Each official build increases the time needed to integrate every new feature and every bugfix. Each official build also increases the time needed to do alpha, beta, and release-candidate testing. But, everyone also wants new Qt versions released regularly, and released on schedule.
- Cost: More official builds require more hardware for testing (which cost money to acquire, run, and maintain). Longer development/testing times also mean that employees need to be paid more for each Qt release.
As part of the effort to balance all these requirements and constraints, 64-bit MinGW (and 64-bit MSVC 2010 and 32-bit Mac and many other) builds were left out.
But that's not a big issue, because your core requirement is:
[quote]I want Qt Creator which can compile 32 & 64 bit applications[/quote]There are 3 options that can meet that requirement:
- Use the official 64-bit MSVC 2012 build
- Use the unofficial 64-bit MinGW build
- Build your own 64-bit MinGW build
You said you don't want to rely on MSVC, and you're skeptical about unofficial builds. Why?
Please go through a proper selection process and choose that best option for you.
I am new to Qt, and in way over my head, but could someone maybe explain how to use the second option listed above? "Use the unofficial 64-bit MinGW build"
I've downloaded and installed this:
I found the qtcreator.exe and I have Qt running. I tried to open a project I created in my other "legit" Qt installation. I am seeing the message "No valid kits found". I think I need to point Qt at the 64 bit minGW compiler, but I can't figure out how to do that. Anyone?
(PS: I got into all this because I want to use a package called openCV to write .avi video files...)
Qt 5.1.1 is very old now. Get Qt 5.2.1 instead from http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/Qt-Builds/
To set up your tools,
See "Adding Compilers":http://qt-project.org/doc/qtcreator-3.1/creator-tool-chains.html to tell Qt Creator where to find your compiler
See "Adding Qt Versions":http://qt-project.org/doc/qtcreator-3.1/creator-project-qmake.html to tell Qt Creator where to find the Qt binaries
Finally, see "Adding Kits":http://qt-project.org/doc/qtcreator-3.1/creator-targets.html to tell Qt Creator how to combine your compiler with the Qt binaries.
You might also need to run the qtbinpatcher tool (go to http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/Qt-Builds/ and read the first section underneath the downloads list). I haven't used the unofficial packages myself, so I'm not 100% sure.
Thanks a lot for the info. I will have a go.