XXX Chats

Xxx mobile video chat

Updating version number at compile time

With this you can now get a pointer to an array of all the build_info_t structures and print them out if you wanted to know when things were built: Note, I haven't actually tested the above so I may have some syntax wrong or may have overlooked something important.

For one thing check to make sure that optimization doesn't remove the entire structure since it's static and unused.

Hello, Imagine the same solution for a shared library. It seems that it is unable to get the address of the symbol... First I have to say I tested your solution on a standard binary. But I have in charge of a "big" software using a lots of shared libraries.

when doing nm mylib.so, I have my symbol __BUILD_LIBVER but no way to get it. Best Regards, Pascal When you say "It seems that it is unable to get the address of the symbol", what do you mean? :) First I want to say your solution is my prefered one compared to a script updating a header file with #define BUILD_NUM XXXX because changing header file changes the dependencies and then need to compile it again for no reason... And I would like to use your solution in every artifacts I build (binaries, shared libraries).

If you routinely run I'm working on a large project with multiple modules.

We would like to have an incrementing build number for each module but the individual modules don't do any linking in the make file so I'm having trouble setting this up.

I've done a fair amount of work in trying to verify what source object code came from, and guaranteeing that a build of that same source at another point in time will produce identical output.

updating version number at compile time-12

This is largely of interest to a distribution that wants to make sure their source packages recompile as expected.Do you have any advice to be able to use this without linking or to link from the main make file and increment the individual modules build number when they are built?That would give each object file a build number and date.Microsoft is conducting an online survey to understand your opinion of the Msdn Web site.If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site. This sort of "feature" is quite annoying in doing that. There is even a gnu cpp compiler macro that you can use (if forget what it is). However, make will complain about a circular reference.The problem is that identical source input starts to produce binary output that differs every time a second ticks off the clock. Instead of: OBJECTS=bnum.o You may want to do this: SOURCES=bnum.c OBJECTS=$(SOURCES:.c=.o) Then - (note dependency change) $(BUILD_NUMBER_FILE): $(SOURCES) @if !Does the linking fail or the linking succeeds but the value is wrong? So I did a basic test project aiming at verifying it's ok...Have you tried adding a function to your library that returns the value? and here's the results: Is it random in that it comes out differently each time you run it or is it always the same but wrong?I think that it is called at the beginning of the build of the tree with a command line parameter "preproc" which you could handle by creating the version file.So this would be once and only once for any build that uses

Comments Updating version number at compile time