Saturday, December 1, 2012

Compiling Qt for visual studio 2012 - windows 8

Download Qt 4.8.4 from here
Download Perl from here
Download JOM from

1. Install Perl, which we downloaded

2. Extract the Qt src file (zip file) to C:/Qt

3. Qt 4.8.4 has problem compiling the webkit module so we have to replace
C:\Qt\src\3rdparty\webkit\Source\JavaScriptCore\wtf\HashSet.h with this HashSet.h 
4. Extract JOM to C:/Qt/jom

5. Set up the environment variables for Qt

6. Update PATH variable to  %QTDIR%\bin
add ';' to the end of the path and then append %QTDIR%\bin

7.Open VS2012 Native tools command line and move to C:\Qt

cd C:\Qt
8.Then type 
configure -opensource -platform win32-msvc2012
9. Then type
jom\jom.exe -j n
where n is the number of cores of your CPU.For me its ( jom\jom.exe -j 2 )

Compilation usually takes 5 - 6 hours