5

I'm getting bothering code analyzer error in Eclipse CDT. It does not work fine with C++11 features. __GXX_EXPERIMENTAL_CXX0X__ is defined and compiler flags are set. Library compiles and works fine, though I can't find a way to tell Eclipse that nullptr is a keyword! Please don't highlight it.

Stupid Eclipse :)

I'm using default version of current LTS Ubuntu (12.04). It's Indigo (3.7.2).

Stefan Falk
  • 23,898
  • 50
  • 191
  • 378
sorush-r
  • 10,490
  • 17
  • 89
  • 173
  • I'm using default version of current LTS Ubuntu (12.04). It's Indigo (3.7.2) – sorush-r May 03 '13 at 09:57
  • I am also using 12.04 LTS and I don't have any issues with Indigo or Juno. Although I have turned of the static analyzer completely because it gives me [tons of false positives](http://stackoverflow.com/q/13458396/341970), it's practically useless. So long story short, I don't have any better idea than turning of the static analyzer. Sorry... :( – Ali May 03 '13 at 11:37
  • Please find: http://stackoverflow.com/questions/9131763/eclipse-cdt-c11-c0x-support/15098556#15098556 – rav May 05 '13 at 10:15
  • @ravwojdyla I already do that. Just didn't worked. – sorush-r May 05 '13 at 16:03
  • @soroush are you sure that those flags are set for cdt parser not for external compiler? – rav May 06 '13 at 16:20

1 Answers1

0

Windows -> Preferences -> C/C++ -> Settings -> CDT GCC Built-in Compiler Settings

You can specify the standard there:

gcc -std=c++11 ${FLAGS} -E -P -v -dD "${INPUTS}"

It works fine for me, I'm using Mars however.

dau_sama
  • 4,247
  • 2
  • 23
  • 30