News:

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

Main Menu

#defines are not taken in acount by highlighter when ifdef is in other file

Started by erektus, January 03, 2014, 09:45:26 PM

Previous topic - Next topic

erektus

Hi All,

I have some issue of highlighting when I'm using #define Something in different C or H file in same project.

in one h-file I have defined:

#define MCDebug

in other file I have #included that h-file and have this

#ifdef MCDebug
printf("Debug");
#endif // MCDebug

instead of

#ifdef MCDebug
printf("Debug");
#endif // MCDebug

Code is compiled correctly, code inside #ifdef is compiled, but CodeBlocks incorrectly indicates by color that code as left out.
Highlighting works correctly when #ifdef is in same file as #define, but not highlighter doesn't take #defines between files.

Color is not the only one issue. Between #ifdef and #endif section in this case doesn't work code completion feature.

Is there any option to this or something that I can do to force highlighter to work as I want?

Thank you
Tomas