Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » C++ 11 headers issue
C++ 11 headers issue [message #1034561] Fri, 05 April 2013 11:32 Go to next message
Eclipse UserFriend
Hello,

I'm using MinGW and one of headers is <initializer_list>
it 's compiled successfully, but Eclipse parser can't parse this template correctly,
it doesn't highlight the include itself, then eclipse "sees" the header but shows the error: "Symbol 'initializer_list' could not be resolved"

I've opened initializer_list header and see that CDT highlights block (most of this header) as __GXX_EXPERIMENTAL_CXX0X__ is not defined:
"
...
#ifndef __GXX_EXPERIMENTAL_CXX0X__
# include <bits/c++0x_warning.h>
#else // C++0x
...
"
I believed that compiler option -std=c++11 defines this, is not it? because compiler works without errors.
But CDT parser have started to work properly only when I added __GXX_EXPERIMENTAL_CXX0X__ into C++General/Paths and Symbols/Symbols
why?
Re: C++ 11 headers issue [message #1749879 is a reply to message #1034561] Tue, 13 December 2016 08:44 Go to previous messageGo to next message
Eclipse UserFriend
Same problem here.
I use Eclipse CDT Neon, the toolchain is Linux GCC (version 5.4) with the "-std=c++11" flag.
The Eclipse parser sees an error (Symbol 'initializer_list' could not be resolved) whereas the code compiles and works perfectly fine.
Re: C++ 11 headers issue [message #1749911 is a reply to message #1749879] Tue, 13 December 2016 13:21 Go to previous messageGo to next message
Eclipse UserFriend
I tried reproducing the problem. When I changed the language standard:

index.php/fa/27857/0/

I was prompted to rebuild the index:

index.php/fa/27858/0/

After that the indexer behaved properly.

So there are a couple of things going on, perhaps sometime in the past "Remeber my decision" saved a No so you weren't prompted, or perhaps CDT didn't notice the setting change affected the index.

Either way, you should be able to resolve it by right-clicking on the project and choosing Index -> Rebuild.
Re: C++ 11 headers issue [message #1749912 is a reply to message #1749911] Tue, 13 December 2016 13:23 Go to previous messageGo to next message
Eclipse UserFriend
PS If you aren't getting the prompt when changing the setting, you can reset the Remember my decisions aka do not show again prompts in C/C++ Preference Page:

index.php/fa/27859/0/
  • Attachment: clear.png
    (Size: 54.98KB, Downloaded 1246 times)
Re: C++ 11 headers issue [message #1749926 is a reply to message #1749912] Tue, 13 December 2016 16:54 Go to previous message
Eclipse UserFriend
@Jonah Graham: Great detailed answer, thank you very much! That solved my problem.

[Updated on: Tue, 13 December 2016 16:57] by Moderator

Previous Topic:Arduino plugin: Supported boards (Platforms): rfDuino
Next Topic:MSP430 no MCU targets
Goto Forum:
  


Current Time: Tue Jul 22 18:50:18 EDT 2025

Powered by FUDForum. Page generated in 0.07086 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top