The default search path for ICC's header files as installed by Gentoo is: /opt/intel/compiler90/substitute_headers/c++ /usr/lib/gcc-lib/PLATFORM/include/g++-v3 /usr/lib/gcc-lib/PLATFORM/include/g++-v3/PLATFORM /usr/lib/gcc-lib/PLATFORM/include/g++-v3/backward /opt/intel/compiler90/include /opt/intel/compiler90/substitute_headers /usr/include This means, that including a C++ header like <cstdio> will get the file /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/include/g++-v3/cstdio instead of /opt/intel/compiler90/include/c++/cstdio, like it should. This causes compilation to fail. Reproducible: Always Steps to Reproduce: 1. 2. 3.
A very simple (albeit somewhat unsatisfying) fix is: # cd /opt/intel/compiler90/substitute_headers # ln -s ../include/c++
Another option to solve this problem is to use ICC with the following flags: CFLAGS="-no-gcc" CXXFLAGS="-no-gcc -cxxlib-icc" LDFLAGS="-cxxlib-icc" ICC's -help output claims "-cxxlib-icc" would be a _linker_ flag, but in fact it changes the definition of the include search path too.
The only version left in the tree is 9.1.045; reopen if it's still a problem there.