embed version information on binaries

Hello,

I would like to know How can I embed version information on Unix c++ binaries(executable). In windows we can use resource file to specify version info and other file attributes. Is there any similar way or any other mechanism in which I can embed file details inside the binary and retrieve it later ?


Thanks in advance
Chanthu
The best is probably to parse the command line and maintain version information in the source files yourself. Many linux programs take a --version parameter which displays some version info. There are no .rc or .res files for linux.
Just put a

static const char* version = "v1.5";

in one of your source files.

The string will get embedded in the executable.
Topic archived. No new replies allowed.