Author Topic: #defines are not taken in acount by highlighter when ifdef is in other file  (Read 10656 times)

erektus

  • Guest
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:
Code
#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