Author Topic: About colors and doxygene when code between #ifdef..#endif  (Read 5117 times)

Offline Crepuscule

  • Multiple posting newcomer
  • *
  • Posts: 22
About colors and doxygene when code between #ifdef..#endif
« on: October 22, 2012, 02:40:16 pm »
Hi everybody!

    I am an ardent user of Code::Blocks since few years. I always used to official version 10.05 version but last week I passed directly to the 8438 version. In this version I discovered the Doxygene plugin that is excellent.
I use the langage C only for embedded software.

But I have a problem about source code between:

Code
#ifdef XXXX
...
#endif

All the parts of source code between "#ifdef" and "#endif" which are not defined by a "#define" line are in grey very light.

Concerning my work, I have a lot of preprocessor directives which are not defined by a "#define" line but directly from the compilator. I don't want to change that (don't ask me why... it is a long and complicated history).
Consequently, when I open my source code with code::blocks I see a lot of code in grey very light... I can generate doxygene documentation related to these parts of code and I can't see my functions between "#ifdef" ... "#endif" in the list of function at the top of code::blocks when I am in a specific file.

Do you know if there is a checkbox to enable all preprocessing code?

Best regards,


Crepuscule

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: About colors and doxygene when code between #ifdef..#endif
« Reply #1 on: October 22, 2012, 03:24:10 pm »
Settings -> Editor -> Tab "C/C++ settings" -> Disable the checkbox "Interprete #if ..."
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Crepuscule

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: About colors and doxygene when code between #ifdef..#endif
« Reply #2 on: October 22, 2012, 03:31:43 pm »
Thank you very much!!
It is exactly what I looked for!

Best regards,


Crepuscule

Offline gonboy

  • Multiple posting newcomer
  • *
  • Posts: 29
Re: About colors and doxygene when code between #ifdef..#endif
« Reply #3 on: October 23, 2012, 08:14:01 am »
But If you set "Project -> Compiler Settings -> defines " in "Build Option" ,
that's won't to interpret the code by different colors