Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-15-2004, 07:28 AM   #1
Registered: Aug 2003
Location: DMZ
Distribution: Ubuntu
Posts: 144

Rep: Reputation: 15
Compilation Timestamp

Some programs do print the time they were compiled. And I am sure they do not add it by hand. I think there is macro or something used by gcc or make .. etc to to that.
So does anyone knows what is it
Old 10-15-2004, 07:35 AM   #2
Senior Member
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
ummm, seeing how its only "some" programs, i believe they would have added it by hand

probably from the scripts known as the all mighty ./configure

thus i think the macro would be m4?

(look into automake / autoconf I'm sure the answer lies there)
Old 10-15-2004, 08:14 AM   #3
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,571

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
I think this is what you are looking for:
        char *compiled=  __DATE__ " @ " __TIME__;
Old 10-16-2004, 06:00 PM   #4
Registered: Aug 2003
Location: DMZ
Distribution: Ubuntu
Posts: 144

Original Poster
Rep: Reputation: 15
I think yes, I am gonna try it now jilliagre
Thanks a lot


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Timestamp Help jch02140 Linux - Newbie 7 03-17-2006 03:33 AM
timestamp question jch02140 Linux - Newbie 3 07-19-2005 04:40 AM
Unix Timestamp Nargile Linux - Software 1 03-17-2005 10:07 PM
Timestamp inconsistencies J.W. LQ Suggestions & Feedback 3 03-07-2005 05:47 PM
sql timestamp help vickr1z Linux - Newbie 6 10-12-2004 09:24 PM

All times are GMT -5. The time now is 08:46 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration