Version Numbers in a project with Qt
问题 Version numbers are needed all over a project; in installers, code, toolchains etc. I despise duplication. I want my version numbers to be stored in one central authoritative location. I am working with C/C++ and using Qt on various platforms. In Qt, qmake projects specify version numbers like: VERSION = 1.2.3 In code I use something like in a header like Version.h: #define VERSION_MAJ 1 #define VERSION_MIN 2 #define VERSION_REV 3 #define VERSION_STRING \"VERSION_MAJ\" "." \"VERSION_MIN\" "."