no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | cybiko:buildstring [2009/11/27 17:54] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======C Build string====== | ||
+ | This is useful when you are constantly compiling a program and can't remember what version is on what machine. | ||
+ | |||
+ | The executable was compiled under the cygwin environment so you will need this environment to be able to run this program. {{compiled.c}} {{compiled.exe}} | ||
+ | |||
+ | Alternatively if you only have dos then you can download the {{cygwin1.dll}} and put this file in same location as the exe. | ||
+ | |||
+ | <code c> | ||
+ | # | ||
+ | # | ||
+ | |||
+ | | ||
+ | | ||
+ | " | ||
+ | }; | ||
+ | |||
+ | int main(void) | ||
+ | { | ||
+ | | ||
+ | | ||
+ | char s[200]; | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | } | ||
+ | </ | ||
+ | This would be called from your makefile like this. | ||
+ | < | ||
+ | | ||
+ | @echo linking... | ||
+ | @$(CC) -R0 $(OBJ) $(LIBS) @res/ | ||
+ | |||
+ | | ||
+ | @..\compiled > | ||
+ | </ | ||
+ | |||
+ | Then all you would have to do is make sure you reference the date constant using the following code block. | ||
+ | <code c> | ||
+ | extern char *compiled; | ||
+ | </ | ||
+ | {{tag> |