News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Solved: Code Dimmed for successful#ifdef block

Started by zeroth, January 18, 2013, 06:45:34 PM

Previous topic - Next topic

zeroth

I've got a defines listed in my project's build options, and an #ifdef for it in a cpp file. the define is true, and the code compiles and executes. however, codeblocks dims the code inside the #ifdef block... and it shouldn't. It's annoying to code in this area because of this.

Is this a bug or was codeblocks just never coded to look for defines there? I'd hack in a quick work-around if I knew what I was looking for... is "code dimming" the proper terminology for this feature?

CodeBlocks svn 8468

Jenna

This depends on the version of C::B you use.
Look into "Settings -> Editor ... -> General settings -> C/C++ editor settings".

zeroth

I presume "Collect defines from the project file" is what you were looking for?


zeroth

After unchecking and re-checking that option, the problem is now resolved.

euzkoarima

I'm using 12.11 release version on Ubuntu 12.04
Works ok with defines in build options and defines in the same source, but fail with defines in headers !!