Author Topic: [Solved] Debug/Release environmental variable  (Read 1606 times)

Offline rebelxt

  • Single posting newcomer
  • *
  • Posts: 5
[Solved] Debug/Release environmental variable
« on: September 05, 2015, 06:54:20 pm »
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.
« Last Edit: September 06, 2015, 01:34:12 pm by rebelxt »

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Debug/Release environmental variable
« Reply #1 on: September 05, 2015, 07:21:18 pm »
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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7108
    • My Best Post
Re: Debug/Release environmental variable
« Reply #2 on: September 05, 2015, 07:22:20 pm »
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++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline rebelxt

  • Single posting newcomer
  • *
  • Posts: 5
Re: Debug/Release environmental variable
« Reply #3 on: September 06, 2015, 01:33:33 pm »
Apologies for not knowing the proper terminology; I'm pretty much new at this. That being said, scarphin has the answer I need.  Thanks.