Welcome

Wheresoever you go, go with all your heart. (Confucius)

4/28/2014

Compile Qt 5 64bit library with Visual Studio 2010 Professional


Qt does not support 64bit library officially, but you can build that.
Although 64bit library is unstable, it is useful to establish 64bit environment with QT and Visual Studio 2010 professional. First of all, Visual Studio 2010 professional is installed on you system. Steps are as followings:
  1. Install Perl if Qt version is more than 4.8.0 because it use Perl to configure building.
  2. Download and install qt5(visual studio 2010).
  3. Open Visual Studio x64 Win64 Command Prompt (2010)
    • Location: Start->All Programs->Microsoft Visual Studio 2010->Visual Studio Tools->Visual Studio x64 Win64 Command Prompt (2010)
  4. Set up environmental variables
    > Set QTDIR=C:\Qt\5.2.1\qtbase
    > Set QMAKESPEC=win32-msvc2010
  5. Update PATH variable to include %QTDIR%\bin in System environments
  6. Download the latest version of jom which speeds up Visual C++ Qt Builds by supporting parallel processes.
  7. Extract jom files to C:\Qt\jom folder
  8. Run following commands in it (every line is a different command: type it then press Enter):
    > cd c:\Qt\5.2.1\qtbase
    > configure -debug-and-release -opensource -platform win32-msvc2010 -opengl desktop -nomake examples
    > ..\jom\jom.exe -j N
    Where N is number of CPU cores you want to utilize for Qt compilation. Larger is better.
  9. Run the following command. 
    • > ..\jom\jom.exe clean
    • One can safely shrink its size by deleting temporary files created during the process.  Note that PDB files will be deleted too. 
  10. Download and install Qt Visual Studio Add-in.
  11. Run Visual Studio 2010. Integrate just compiled Qt to IDE using menu Qt > Qt Options > Qt Versions > Add