Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: zyd on April 25, 2007, 09:48:57 am

Title: DEBUG and RELEASE condition compile
Post by: zyd 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? :( :(
Title: Re: DEBUG and RELEASE condition compile
Post by: MortenMacFly 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.
Title: Re: DEBUG and RELEASE condition compile
Post by: zyd on April 25, 2007, 11:04:23 am
3ks.