I try to create a version define dynamic based on other defines
I do something like:
- #define MAJOR_VERS 2
- #define MINOR_VERS 0
- #define VERSION "$VER: myApp v" MAJOR_VERS "." MINOR_VERS
The problem is when I try to compile it with vbcc I get the following error when I try to use it
- warning 57 in line 1076 of "src/myAppGUI.c": , expected
the line where the error occurs is has the following
- MUIA_Application_Version, VERSION,
Any idea what I miss here?
As the MAJOR_VERS and MINOR_VERS macros are numbers and not strings you need to either use an additional macro to add quotes around them like:
or you could just define them as strings in the first place:
It works great. I don't believe how simple it is. And I was using same solution elsewhere. I think I was confused because of the error message.
Thank you again for your help.