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

Enabling C++11 with ICC in Eclipse Indigo

T_C
Beginner
375 Views

Hi,

There appears to be a problem when using the Eclipse GUI editor and intel compiler for C++11/C++0x features. My code runs perfectly but the Eclipse syntax editor highlights some C++11 code as being illegal. I went into the ICC settings and added "-std=c++0x" so the ICC was working fine. However, there is some other Intel-specific parameter I need to insert into Eclipse (somewhere).

The problem is, when searching for advice I could only find GCC-specific solutions. To fix this problem for GCC you have to insert the argument "__GXX_EXPERIMENTAL_CXX0X__" somewhere in Eclipse. The other problem I had is that not only were the solutions for GCC but also Eclipse Juno and I am using Indigo (because thats what comes with Ubuntu).

Would someone from Intel (or anyone else) please help me solve this situation because its preventing me from using ICC with Eclipse? I did take a look at the Eclipse forums but hardly anyone replies to posts there. If its useful, the code I was getting issuses with is: 

http://en.cppreference.com/w/cpp/thread/sleep_for

Once again, my code was executing file- but the Eclipse syntax editor wasn't detecting the C++11 features determined by the ICC.

0 Kudos
1 Reply
T_C
Beginner
375 Views

Forgot to mention, I did go to Project Properties->C/C++ Build ->Discovery Options and set the "-std=c++0x" option there too, rebuilt and re-indexed the project and it still wouldn't fix the problem.

0 Kudos
Reply