Mail Archives: djgpp/1997/09/18/01:30:22
From: | pjfarley AT dorsai DOT org (Peter J. Farley III)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: is there a way of getting compilation listing??
|
Date: | Thu, 18 Sep 1997 02:04:25 GMT
|
Organization: | None
|
Lines: | 42
|
Message-ID: | <342084b1.17382258@snews.zippo.com>
|
References: | <341EBD31 DOT 68E6 AT swt DOT edu>
|
NNTP-Posting-Host: | news.newsdawg.com
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Jeff Wilson <DW26524 AT swt DOT edu> wrote:
>In my data structures class..the prof wants a compilation listing of the
>program...not just XXXX.c...is there a way to do that?
>
>I am guessing so, since he recommended this program to use...but refuses
>to devulge any info about it to us....
>
David,
Just guessing here, but does your prof by any chance come from an IBM
mainframe environment? In that environment (unlike PC's and *nix
machines), every compiler produces a full *dated* source listing
(proving both that you compiled it and that the compilation was
successful) with line numbers and sometimes relative nesting levels, a
list of errors found by the compiler (if any), optionally a
cross-reference of datanames and/or labels, optionally a listing of
the assigned memory locations of data structures (e.g., COBOL working
storage), optionally a list of the starting relative memory locations
of each instruction, etc. Even the C/370 compiler has most of these
things as part of its normal output from a compile process.
You might tactfully point out to your professor that gcc (in any
environment) produces absolutely none of these things. In normal
operation, gcc produces *no* output except the compiled (and/or
linked) program, assuming there are no syntax or linker errors. For
example:
$ gcc -o test test.c
$ ls -ld test*
-rwxr-xr-x 1 dosuser dos 140684 Sep 17 21:46 test
-rw-r--r-- 1 dosuser dos 90 Jun 8 01:48 test.c
-rwxr-xr-x 1 dosuser dos 142732 Sep 17 21:46 test.exe
-rwxr-xr-x 1 dosuser dos 38 Jun 8 01:47 testbat.bat
$
This (along with a console log of an execution of the resulting
program, if that's applicable) may be all that you can provide. Note
that the "ls" command is *separate* from the gcc execution. Ask your
professor if this is sufficient.
----------------------------------------------------
Peter J. Farley III (pjfarley AT dorsai DOT org)
- Raw text -