I have installed Intel' C++ composer XE for Lnux as per
http://software.intel.com/en-us/articles/using-intel-compilers-for-linux-with-ubuntu/on Ubuntu10.04i386 via a Virtual Machine on Mac OSX 10.6.6. Install seems to have completed successfully with this message:
To get started using Intel(R) Composer XE 2011 Update 2 located in
/opt/intel/composerxe-2011.2.137:
- Set the environment variables for a terminal window using one of the following
(replace "intel64" with "ia32" if you are using a 32-bit platform).
For csh/tcsh:
$ source install-dir/bin/compilervars.csh intel64
For bash:
$ source install-dir/bin/compilervars.sh intel64
To invoke the installed compilers:
For C++: icpc
For C: icc
For Fortran: ifort
To get help, append the -help option or precede with the man command.
- To view a table of getting started documents:
install-dir/Documentation/en_US/documentation_c.htm.
I have an installation set up that looks like this:
/opt/intel/composerxe
/bin
icc
icpc
idb
amongst other files. Note that composerxe is shortcut. In CodeBlocks, in
> Compiler & debugger settings,
> Selected compiler
I selected Intel C/C++ Compiler, and I set
> Toolchain executable > Compiler installation directory
to /opt/intel/composerxe. Note that, by default,
C Compiler = icc
C++ Compiler = icpc
Linked for dyn libs = icpc
Linker for static libs = ar
Debugger = empty
Resource compiler = empty
Make program = make
and did not change any of these. Pressed OK in the Compiler & debugger settings.
Do these steps seem right so far?
Created a new project test_icc as a Console Application whose Build Options has Selected Compiler on Intel C++/C Compiler. The new project has by default a main.cpp file (outputs hello world). I do Build > Build, and get:
-------- Build : Debug in test_icc --------
Compiling main.cpp
icpc: error : #10236 : File not found : '/EHs'
icpc: error : #10236 : File not found : '/Zi'
I go back to Settings > Compiler & debugger settings, and I see Selected Compiler = GNU GCC compiler, so I set it instead to Intel C++/C Compiler, although it seems redundant with the build options above. Build > Build. This time no errors:
-------- Build : Debug in test_icc --------
Linking console executable: bin/Debug/test_icc
Process terminated with status 0
0 errors, 0 warnngs
Build > Run Clears the build log but does not output "Hello world". Neither does it launch a terminal window with the output in it.
Build > Rebuild produces
-------- Build : Debug in test_icc --------
Compiling main.cpp
icpc: error : #10236 : File not found : '/EHs'
icpc: error : #10236 : File not found : '/Zi'
Well, you get the idea. What am I doing wrong?
Thanks.