Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Atomic Symbols Cannot be Resolved
Atomic Symbols Cannot be Resolved [message #1734371] Tue, 07 June 2016 15:00 Go to next message
Andrew Lawrence is currently offline Andrew LawrenceFriend
Messages: 1
Registered: June 2016
Junior Member
I cannot get the IDE to resolve any of the atomic symbols (e.g., atomic<uint>, atomic_uint, atomic_flag) even though it compiles and links fine.

I made sure to add the compilation flag -std=c++11 to both the CDT Cross GCC Built-In Compiler Settings and CDT GCC Built-In Compiler Settings within Eclipse Preferences. These settings are for the entire IDE, not a specific project. This was a suggestion from other forum posts regarding not being able to resolve C++11 library symbols in the IDE. I made sure to rebuild my C++ Index afterwards but no help. This was able to correct not being able to resolve thread symbols but atomic are still not able to be resolved.

I also -std=c++11 as another flag to the GCC C++ Compiler within the Project Properties.

I also made sure I had the latest versions of the CDT tools installed as of today (7-June-2016). I am running Eclipse Mars.2 (4.5.2).

The project compiles fine and works but it is just annoying that the IDE constantly reports errors when there are none.
Re: Atomic Symbols Cannot be Resolved [message #1734398 is a reply to message #1734371] Tue, 07 June 2016 22:59 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
I can't either. Probably a bug. The indexer has problems with other things too. Some of which have been resolved in later releases.
Possibly because the definition has some conditional preprocessor code that the indexer is unaware of.

Submit a bug report.


To get around it in the meantime, you can try to make definitions just for the indexer and surround them with #ifdef __CDT_PARSER__ ... #endif

Something like
#ifdef __CDT_PARSER__
template<class T>
class atomic {
    atomic(T x=T());
    :
    :
};
#else
#include <atomic>
#endif

Or get used to seeing red underlined code
Previous Topic:Privileged container support in eclipse CDT
Next Topic:CDT Docker
Goto Forum:
  


Current Time: Sat Apr 27 03:07:08 GMT 2024

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

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

Back to the top