星期一, 六月 11, 2012

Intel compiler 12.1 on Ubuntu 12.04 LTS

I finally deleted my windows on my U110. When installing the Intel compiler icc/icpc 12.1, it gives the following error:
/usr/include/features.h(324): catastrophic error: cannot open source file "bits/predefs.h"
  #include
This is because in the new system, the includes and libraries were put under the hierarchy name.  Including the full path will solve the problem.  So insert the following lines in the .bashrc file in you home:
source /opt/intel/composerxe/bin/compilervars.sh ia32
alias icpc="icpc -B/usr/lib/i386-linux-gnu -I/usr/include/i386-linux-gnu"
alias icc="icc -B/usr/lib/i386-linux-gnu -I/usr/include/i386-linux-gnu"
On a 64 bit machine, you may change i386-linux-gnu to something else.

没有评论: