Is there any concept of defining global variables that can be used by various files in a project?

102 views Asked by At

In my project, I want various C files, Header files, cmake files, rpm spec files, java properties files etc to use a single macro(say version number) (or atleast fetch version from a single file). How can i realise it?

1

There are 1 answers

0
Th. Thielemann On BEST ANSWER

For different source code types it will be tricky to use the same include mechanism. But you can use an autocode to create different output files eg. (systemversion.h, systemversion.java, systemversion.txt) and include them into your cpp/java/rpm files.