A few weeks ago though I looked at the latest version for the fun of it and was super impressed by their demo app with samples. The smooth animations, the high-res icons, the custom controls - exactly what I had been looking for for so long. So without further ado I went on to see if development in this framework is any easier than in other two. Of course it turns out it is not, but the framework provides so much more than others that it's a non-issue when it comes to selecting which one to work with.
Before we go into installation details, a word on MS x64 support:
I like 64 bit. It lessens restrictions that 32 bit modes impose though I'm not saying those problems are insurmountable. It does so with modest size penalty, but brings with it also the benefit of using a newer instruction set of your CPU. Besides, there's no reason I should be running a 32 bit app on my 64 bit OS if I can just as well run a native app, is there?
I have no idea why Microsoft insists on express only having x86 compiler. They are imposing the chicken and egg problem on themselves when their x64 operating systems are concerned.
However, the 2010 version makes it extremely easy to get an x64 compiler working and to make it even simpler, the IDE itself also adapts with just a few mouse clicks. There are plenty of guides for doing this on the net so I will not go into details, but following this particular guide will also get you fully functional cross platform compilers.
Please note that I am doing this on my Windows 7 Home premium x64 computer so your mileage may vary, but I suppose it should not vary by much. So without prolonging this too much, here are the prerequisites:
- Visual Studio 2010 Express install ISO
- VS2010 Service Pack 1
- Windows Platform SDK
- Compiler update for Platform SDK after SP1 patch
- Qt Creator
- Qt Libraries for VS 2008
- Qt jom
- Install VS2010 Express
- Install VS2010 SP 1
- Install platform SDK
- Install compiler update - this one will provide cross platform compilers in your VS bin directory though it isn't needed for IDE x64 development. Absolutely *must* be installed last of these
I suggest you install all Qt related files into the same base directory for later easy access.
While installing the library, instead of taking the x.y.z (version) directory, I suggest you append _x86 to it for later reference. Then duplicate the library directory into a new one with a _x64 suffix. This is necessary because Qt doesn't have x86-and-x64 target meaning you can have debug and release files in the same directory, but not multi-platform ones.
Your Qt directory structure should now look like this:
You see how the x86 and x64 targets are nicely aligned and distinguishable? :D I hope my nagging about suffixes paid off for you as well as it did for me :)
You are all set for compilation by this point.
The next thing to take care of is the fact that your library directory will increase in size from 1,3GB installed to almost 8GB compiled (OK, only 6,5GB for x86 version ;) ).
To compile, the following steps need to be performed from a command prompt. I made two batch files for me in the Qt base directory, you may choose for yourself, naturally:
- call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\setenv" /x86 /win7
- set QTDIR=C:\Qt\4.7.4_x86
- set QMAKESPEC=win32-msvc2010
- set path=%path%;%QTDIR%\bin
- cd %QTDIR%
- configure -debug-and-release -opensource -no-qt3support -platform %QMAKESPEC%
- ..\jom\jom -j 4
Note that the paths may be different in your case. The path in line 1 is your Platform SDK install dir, path in line 2 is your Qt library install dir.
Also you may choose to apply different Qt configurations in line 6 than I did. The flags I chose build everything but legacy support.
You can easily compile both targets at the same time, but make sure you run the compilation before you go to sleep because your CPU is not fast enough to wait it out :)