Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7957 Discussions

How can I select to use intel c++ compiler not intel c (icpc not icc) in eclipse?

joex26
Beginner
571 Views

Hi,
I have the latest Galileo version with CDT 6.0 and Intel v. 11.1.
It always compiles ".o" files uing icc and then executable using icpc. How can I push Eclipse to use icpc?

The reason I want to do it is that I am getting floating point exceptions.
Since I have found this: http://software.intel.com/en-us/articles/intel-c-compiler-floating-point-calculations-produce-nans-with-c-code/ ,
I though it would be good to compile my sources with c++ compiler.

Does anybody know how to set it up in Eclipse, please?

0 Kudos
3 Replies
TimP
Honored Contributor III
571 Views
If you're asking to compile .c source files as C++, would option -Kc++ help?
0 Kudos
Miwako_T_Intel
Employee
571 Views
Quoting - joex26
Hi,
I have the latest Galileo version with CDT 6.0 and Intel v. 11.1.
It always compiles ".o" files uing icc and then executable using icpc. How can I push Eclipse to use icpc?

The reason I want to do it is that I am getting floating point exceptions.
Since I have found this: http://software.intel.com/en-us/articles/intel-c-compiler-floating-point-calculations-produce-nans-with-c-code/ ,
I though it would be good to compile my sources with c++ compiler.

Does anybody know how to set it up in Eclipse, please?

Do you mean you have a C++ project that includes .c files and want Eclipse to use icpc to compile these .c files?
If so, can you go into the property pages (Project->Properties->Settings->Tool Settings), scroll down to
highlight "Intel IA-32 C Compiler(v11.1.0), and change the "Command:" field to icpc?
0 Kudos
joex26
Beginner
571 Views
Thanks both of you,

-Kc++ is deprecated and currently it is -x c++

Selecting icpc also works. But is it legacy to just change it?
I don't know why, but I somehow felt that I cannot change this :). Maybe because I tried to change compiler options below and it didn't allow me to.

0 Kudos
Reply