Re: Question on multiple compiler environment



beliavsky@xxxxxxx wrote:
The Fortran standard says nothing about such
details, which therefore differ across compilers.
> How does one embed the version
number of a compiler in executables generated by it?
As you said, this varies by compiler. Some do it by default, others have a peculiar option for this.

I have also wondered how to embed information about the source code in
the executable. Currently I define a parameter NVERSION in my main
program and have a line at the beginning

write (*,*) "version #",NVERSION

This method relies on my changing NVERSION manually and on saving old
source codes. I know there exist source control systems such as RCS,
but can one use them to automatically embed version information in an
executable?

Perhaps you refer to the practice which was common at one time of initializing a character string such as SCCSID.
.



Relevant Pages

  • Re: Whats going on with C Compilers and C99??
    ... I'm no expert in C, and certainly not on the C99 standard. ... non-C99 compilers, as you've just shown. ... Comeau C/C++ with Dinkumware's Libraries... ...
    (comp.lang.c)
  • Re: Sending pkts on a socket...
    ... > compilers have different size on the standard types like int, short, char, ... They also differ in how much space they leave between the elements of ... a struct. ... know what you are doing *and* have complete control over the compilation ...
    (comp.lang.java.programmer)
  • Re: Append to screen IO
    ... Compilers will differ in how many items they write on one line with ... list-directed output, so Ugo's code is more robust. ...
    (comp.lang.fortran)
  • Re: [RFC][PATCH] A generic boolean
    ... but older compilers (like Turbo C ... compiler ), int is a 16 bit quantity, and therefore does differ, from ... today's implementations at least. ...
    (Linux-Kernel)