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: A C Adventure: your comments are welcome
    ... all compilers ... worth your while trying to hit it. ... for a comprehensive listing of C90 features that differ in meaning or ...
    (comp.lang.c)
  • 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: A C Adventure: your comments are welcome
    ... all compilers ... for a comprehensive listing of C90 features that differ in meaning or legality from C++) but it's not particularly difficult to avoid them; mostly the differences consist of taking code that is legal in C, but a bad idea, and making it illegal in C++. ... I believe that any strictly conforming C program can be modified to have the same required behavior as the original when compiled as a C program, and to also have the same required behavior when compiled as a C++ program. ...
    (comp.lang.c)
  • Re: stddef.h
    ... standard say anything about not having stddef.h? ... On Unixes that have or allow for other compilers headers ... On nonUnix systems using other than gcc, it varies. ... directives that identify the file actually selected by this search. ...
    (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)