News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

[Solved] Debug/Release environmental variable

Started by rebelxt, September 05, 2015, 06:54:20 PM

Previous topic - Next topic

rebelxt

Is there an environmental variable that can be used in my C++ source program to distinguish between the Debug and Release environments? Or is there a way to define one?

I am using Code::Blocks 13.12 in Linux Mint 17.2.

Thanks for any help.

scarphin

In usual sense, 'debug' and 'release' are not environments, they are targets. If you want to distinguish 'debug' and 'release' targets for a project, you can insert a target specific define in menu 'project->build options->compiler settings tab->#defines tab', be sure to select the correct target from the tree to the left. Then you can use these defines inside your code. If you're asking for something else please elaborate.

stahta01

Your question makes no sense to me.
If, you do NOT get another reply in a few hours; I would suggest posting more information on what you are asking.

One point is by "environmental variable" I have no idea if you mean:
1. CB environmental variable
2. CB custom variable
3. OS environmental variable
4. macro definition

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

rebelxt

Apologies for not knowing the proper terminology; I'm pretty much new at this. That being said, scarphin has the answer I need.  Thanks.