Author Topic: Intel C++ - Linux - Troubleshooting  (Read 11500 times)

Offline er

  • Multiple posting newcomer
  • *
  • Posts: 34
Intel C++ - Linux - Troubleshooting
« on: March 03, 2011, 07:37:41 pm »
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.
Code::Blocks 10.05/ Mac OS X 10.6.4/GCC

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Intel C++ - Linux - Troubleshooting
« Reply #1 on: March 03, 2011, 08:10:02 pm »
icpc: error : #10236 : File not found : '/EHs'
icpc: error : #10236 : File not found : '/Zi'
Remove these two incompatible compiler options from either your project/target settings or probably in the compiler settings itself.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline er

  • Multiple posting newcomer
  • *
  • Posts: 34
Re: Intel C++ - Linux - Troubleshooting
« Reply #2 on: March 04, 2011, 03:37:30 pm »
Thanks,

I did :

In Properties >  Project build options > Compiler flags > Other options, Remove EHs
In Build Options >  Project build options > Compiler flags > Other options, Remove Zi

That seems to take care of the build errors above.

However, running does not output "Hello World" anywhere. Isn't it supposed to open a terminal window?
Code::Blocks 10.05/ Mac OS X 10.6.4/GCC

Offline er

  • Multiple posting newcomer
  • *
  • Posts: 34
Re: Intel C++ - Linux - Troubleshooting
« Reply #3 on: March 04, 2011, 06:31:57 pm »
By the way, if I switch from Intel C++/C Compiler to GNU GCC, a terminal window pops up as expected and outputs hello world.

What could be going wrong with my ICC set up?
Code::Blocks 10.05/ Mac OS X 10.6.4/GCC

Online stahta01

  • Lives here!
  • ****
  • Posts: 7787
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline er

  • Multiple posting newcomer
  • *
  • Posts: 34
Re: Intel C++ - Linux - Troubleshooting
« Reply #5 on: March 04, 2011, 09:53:02 pm »
Thanks.

Well, I tried again after a restart and now it outputs hello world in a terminal window. Although I checked that the project is indeed using ICC in the Build options. Is there a flag that could confirm that at run-time in the Build log?
Code::Blocks 10.05/ Mac OS X 10.6.4/GCC