Sorry if this is too dumb.
I can easily compile this code
#include <iostream>
#define PROG_ID "dummy v" VER
using namespace std;
int main()
{
cout << PROG_ID << endl;
return 0;
}
in a makefile, or at the command line by running
g++ -o dummy -DVER=\"0.1\" main.cpp
or
export VAR=0.1
g++ -o dummy -DVER=\"$VAR\" main.cpp
but I can't work out how to do it in CB.
I tried putting
-DVER=\"0.1\"
in the project's build options/compilersettings/#defines
I also tried under Project/ build options/custom variables defining VER=0.1 and changing line 2 of the code to
#define PROG_ID "dummy v" $VER
and various other combinations but nothing seems to work.