delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/15/10:30:58

Xref: news2.mv.net comp.os.msdos.djgpp:7303
From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: gcc /lfile
Date: Wed, 14 Aug 1996 19:20:46 -0700
Organization: Three pounds of chaos and a pinch of salt
Lines: 41
Message-ID: <3212897E.7FDA@cs.com>
References: <32121E83 DOT 7603 AT nortel DOT ca>
NNTP-Posting-Host: ppp212.cs.com
Mime-Version: 1.0
To: Ian Chapman <ichapman AT nortel DOT ca>
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Ian Chapman wrote:
>     What I've failed to find is how to get a listing from the
> compiler.  In MIX power c I just commanded
> 
> pc myfile /lfile /etc   to get a .exe .mix and file.lst.
> 
> The file.lst was great for looking at where the compiler failed to
> make sense of what I asked.
> 
> What switch should I use to get a listing from the gcc compiler?

Since I have never heard of MIX power C, can I assume that what you
are trying to get is a listing of all the messages gcc prints when
it compiles your program?  In that case, you simply need to redirect
its output to a file.  However, be warned that because gcc writes
to stderr, you can't save the messages with a simple DOS '>'.  Use
the 'redir' program that comes with DGJPP like so:

redir -o file.lst -eo gcc .... myfile.c

'-o' tells redir to put stdout in 'file.lst', and '-eo' tells it to
put stderr there too.  You can also use a 'smart' DOS shell that is
capable of redirecting stderr.

Finally, you can also use an editor that saves error messages and
allows you to move to their locations in your program(s) in the
fashion of Turbo Debugger.  GNU Emacs and RHIDE are examples of two
such editors.  Actually, RHIDE is a complete, user-developed IDE
for DJGPP.  It's still in beta though, so beware of bugs.

Pointers to these tools can be found in the FAQ (faq201b.zip).

-- 
John M. Aldrich, aka Fighteer I <fighteer AT cs DOT com>

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s+:- a-->? c++>$ U@>++$ p>+ L>++ E>+ W+>++ N++ o+ K? w(---) O-
M-- V? PS+ PE Y+ PGP- t+(-) 5- X- R+ tv+() b+++ DI++ D++ G e(*)>++++
h!() !r !y+()
------END GEEK CODE BLOCK------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019