Solved

Obtaining VMS c program compile date/time

Posted on 1998-02-06
1
196 Views
Last Modified: 2008-03-10
Is there a way to get the compile date and time from a VMS executable image (such as that displayed when performing an ANALYZE/IMAGE or ANALYZE/OBJECT), and use it in a printf() from within the program ? I know I could probably use a /DEFINE on the cc command line to define a date, but if there is an offset defined in SYS.STB or a header file somewhere that would point to where this information is stored in the executable image file itself, I would prefer to use that.  Thanks!
0
Comment
Question by:xn12z9i
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 32

Accepted Solution

by:
jhance earned 200 total points
ID: 1257185
You can use the predefined date and time macros __DATE__ and __TIME__  (Note: There are 2 "_"s both before and after the macro names) in your printf statement.  Example:

#include <stdio.h>

void main()
{
 printf("This program was compiled %s at %s\n", __DATE__, __TIME__);
}
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question