I am trying to bake in the value of a build variable at build time. For instance, if I right click on my App in SDK and select "C/C++ Build Settings", then select "Build Variables" under "C/C++ Build" and check "Show system variables", I see many variables including "RDI_INSTALLVERSION" (set to "2016.4" in my case). I want to bake this into the code so that the value "2016.4" can be printed to debug or written to a file etc. However, if I use RDI_INSTALLVERSION or $RDI_INSTALLVERSION or %RDI_INSTALLVERSION%, I get a compile error.
Is there a way to access these variables and what is the syntax? I am using a bare metal build.