Damien LEFEVRE

Compiling Qt with Intel Composer

Pre-requisites

Make sure to have perl installed and accessible from PATH. I use strawberryperl.

 

By default the Intel Compiler build treats WChar_t As Built in Type (/Zc:wchar_t). The issues here is that the projects are created with this option turned OFF (/Zc:wchar_t-) and so is the VS2010 vanilla distribution. With the worry of being able to switch back and forth, I attempted to compile Qt ICC with the option turned OFF. I found a qmake.conf file, according to my path here C:\Qt\4.8.2-icc\mkspecs\win32-icc\qmake.conf. I modified the QMAKE_CXXFLAGS line like this: 

  • QMAKE_CXXFLAGS= $$QMAKE_CFLAGS /Zc:forScope /Zc:wchar_t-

 

Batch build

To make live easier I came up with a small batch file to do the builds. My folder structure is so:

  • C:\Qt
    • C:\Qt\4.8.2-icc
    • C:\Qt\4.8.2-icc-x64
    • C:\Qt\jom (download)

Inside 4.8.2-icc I copy build_qt_icc.bat which contains:

configure -nomake examples -nomake demos -opensource -platform win32-icc

..\jom\jom.exe

..\jom\jom.exe clean

 

Finally, I open the Intel Composer command prompt and run the batch file. Ex for 32-bit compilation:

...\>cd C:\Qt\4.8.2-icc

...\>build_qt_icc.bat

 

Note

I have tried to run both 32 and 64 batch builds simultaneously and they always fail. Building them on after another is fine.

This Qt version is not compatible to your current Visual Studio (Qt builds VS version:0, current version: 1600)

I got this error message when trying to add in the VS Qt add-in a Qt folder compiled with Intel Composer 2013.

 

This is due to a bug in the add-in version 1.1.9 (QTVSADDINBUG-87) and had to upgrade to 1.1.11 which I know will give me other issues (QTVSADDINBUG-125).

 

Upgrading to 1.1.11 fix this problem. I'm just hoping that the version 1.2.x will not only be released for Qt 5.x.


 

 

View Damien Lefevre's profile on LinkedIn