参考:https://svn.haxx.se/dev/archive-2006-02/1156.shtml
Makefile中加入如下定义:
SVNDEF = -D'SVN_REV="$(shell svnversion -n ./)"'
代码中使用SVN_REV变量打印版本号
printf("version:%s\n", SVN_REV);
标签:SVN,加入,版本号,Makefile,REV,C++,printf
来源: https://blog.csdn.net/chn_lukai/article/details/122745330