Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Symbol definition on GUI(Symbol definition works to compile a file, but the GUI seems to ignore the defines)
Symbol definition on GUI [message #749083] Mon, 24 October 2011 22:59 Go to next message
Eclipse UserFriend
I tried to find anything about this on the forums, but I couldn't, so I decide to open a topic.

I'm facing some trouble using the symbol definition.

When I include a symbol definition to my project, it works fine to the compilation process (e.g. -DDEBUG).
The problem is that the GUI doesn't seem to detect the global definitions.

e.g.:
If I create 2 different configurations (Debug Linux and Debug MacOS) and include, for exemple, a symbol named MACOS on Mac config, and a symbol named LINUX on Linux config, and use it like this on the code (with the configuration Debug MacOS active):

#ifdef LINUX
...
#elif defined MACOS
..
#endif

The compiler is going to understand it right and compile the way I want, but the GUI is actually thinking that the first define is defined, and the MACOS code is shown as gray (ignored code).
I know that this is basically an aesthetic problem, but with this little problem the GUI thinks that the code has some errors (those red X on the file).

Do you know if it is possible to solve this problem?
Re: Symbol definition on GUI [message #749522 is a reply to message #749083] Tue, 25 October 2011 05:14 Go to previous messageGo to next message
Eclipse UserFriend
Windows->Preferences->C++->Indexer
Build configuration for the indexer: Use active build configuration
Re: Symbol definition on GUI [message #749693 is a reply to message #749522] Tue, 25 October 2011 07:26 Go to previous message
Eclipse UserFriend
Thank you so much. Smile
Previous Topic:Eclipse can not find library even though it exists.
Next Topic:CDT and embedded device development
Goto Forum:
  


Current Time: Wed Jul 09 16:03:18 EDT 2025

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

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

Back to the top