Hi,
I would like to know if there is a way to embed Mercurial tags into my C/C++ code. Basically I would like the tag string, which will end up being a release number (major.minor.rev), to be automatically inserted in a determined location of my C code as a static string.
The overall objective is that the application could be queried about its version number when executed with say a '-v' command line argument. Any alternative approach that doesn't involve trying to embed a Mercurial tag will be also welcomed as an answer.
BTW, I am using Code::Blocks on a Linux environment, so the solution can not rely on fancy VStudio features.
Thanks!