You need to reference your version number information somehow from your application, otherwise it gets removed by the linker.
something like this:
static const unsigned char *versionInfo="1.2.2.4";
int main(void) {
if (versionInfo[0] == '\0') { /* check just to reference it. */
return -1;
}
...
....
}