Build QT Libraries with Intel compiler (Linux)

Download QT libraries source code from: http://qt.nokia.com/downloads/linux-x11-cpp
Build with GCC:
1. unzip the package and go to the root folder.
2. Build:
[shell]mkdir prefix ./configure --prefix=./prefix/ make make install[/shell]
Build with ICC:
1. unzip the package and go to the root folder.
2. Build:
[shell]source /opt/intel/composer_xe_2011_sp1.8.273/bin/compilervars.sh intel64 mkdir prefix ./configure --prefix=./prefix/ -platform linux-icc-64 make make install[/shell]
Some notes:
1. Use the "-platform option" to configure the build process for intel compiler. We can use CC/CXX/LD/CFLAGS/CXXFLAGS/LDFLAGS and other environment variables to override the platform settings. But to set platform option can avoid some unexpected errors while buiding.
Example: using following script, you may meet many errors:
[shell] source /opt/intel/composer_xe_2011_sp1.8.273/bin/compilervars.sh intel64 export CC=icc export CXX=icpc mkdir prefix ./configure --prefix=./prefix/ make make install[/shell]
2. Do not forget to use "source /opt/intel/composer_xe_2011_sp1.8.273/bin/compilervars.sh intel64" to set up the intel compiler environment (LD_LIBRARYPA and so on.) If you only add "/opt/intel/composer_xe_2011_sp1.8.273/bin/" to PATH environment variable, you will get some linking errors while building.
3. In <qtsrc>/mkspecs folder, all the folder names are possible values for "-platform" option.
For more complete information about compiler optimizations, see our Optimization Notice.