Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » #ifdef Symbol are not responding to -Dsymbol settings through Properties(#ifdef Symbol are not responding to -Dsymbol settings through Properties)
#ifdef Symbol are not responding to -Dsymbol settings through Properties [message #1431021] Thu, 25 September 2014 05:38 Go to next message
Bob Furber is currently offline Bob FurberFriend
Messages: 4
Registered: April 2012
Junior Member
I am having difficulty getting conditional compilation to work on Keppler Eclipse/CDT on an Ubuntu 13.04 PC. The -D symbols entered in Properties > C/C++ Build > Settings > GCC C++ Compiler > Preprocessor and ..Settings > GCC C Compiler > Symbols do not seem to have any effect on #ifdefs in the code, nor do they appear as -DSymbol in the console output of a build.

I should mention the C code has some C++ I/O, so "*.c", "*.h" as c++ sources have been added in Properties > C/C++ General filters.

Any ideas as to what I am missing?
Re: #ifdef Symbol are not responding to -Dsymbol settings through Properties [message #1432149 is a reply to message #1431021] Fri, 26 September 2014 18:00 Go to previous message
Bob Furber is currently offline Bob FurberFriend
Messages: 4
Registered: April 2012
Junior Member
Doh!

Solved the #ifdef problem:
Properties C/C++ General > Indexer:
* check "Enable specific project settings"
* check "use active build configuration"

Not sure why the default settings were set to "use a fixed build configuration", which caused the problem when I switched to build configuration with different symbols defined. These were ignored.
Previous Topic:Windows 8 cross compile works in prompt, not in eclipse
Next Topic:Configuring CDT
Goto Forum:
  


Current Time: Tue Oct 15 03:22:53 GMT 2024

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

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

Back to the top