How to define a build variable

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
Content originally posted in LPCWare by tvink on Mon Apr 25 07:21:02 MST 2016

I want to define a build variable ( with a value ) and keep it in the project properties.  There seems to be a place for this in "properties->C/C++ build->Build Variables"  however I can not get this to work when I build. 

I have a variable "blabla" with a value 1, of type string.  ( everything is in debug configuration )
I have tried placing this in the properties for my project and in the properties of the referenced item where the #if resides.  Have tried with the "Show system variables" checked and unchecked in the Build Variables dialog.

In my code I have 

#if(blabla == 1)
code here
other code here

The if clause continues to be greyed out.
If I place the define #define blabla 1 in my header file, it works.

Should this work from the project files or am I missing something.