Author Topic: DEBUG and RELEASE condition compile  (Read 4225 times)

Offline zyd

  • Multiple posting newcomer
  • *
  • Posts: 25
DEBUG and RELEASE condition compile
« on: April 25, 2007, 09:48:57 am »
In VC, I can do like this:
#ifdef _DEBUG
......
#else
......
#endif
I only select debug or release and it do what I want.

In CB, How can I do it? :( :(

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: DEBUG and RELEASE condition compile
« Reply #1 on: April 25, 2007, 10:26:12 am »
In CB, How can I do it? :( :(
The same, hence you may need to provide a compiler define "_DEBUG" accordingly (project build options -> target "debug" -> Compiler settings -> #defines).
If you setup 2 targets (release/debug) within your project you can select the target (just as in VC) and do what you want...
With regards, Morten.
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 zyd

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: DEBUG and RELEASE condition compile
« Reply #2 on: April 25, 2007, 11:04:23 am »
3ks.