News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

DEBUG and RELEASE condition compile

Started by zyd, April 25, 2007, 09:48:57 AM

Previous topic - Next topic

zyd

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? :( :(

MortenMacFly

Quote from: zyd on April 25, 2007, 09:48:57 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

zyd