comp.lang.ada
 help / color / mirror / Atom feed
* Can't redirect output from gnat-3.13p-nt
@ 2001-08-17  8:31 Vincent Smeets
  2001-08-17 13:28 ` Marin David Condic
  2001-08-17 13:59 ` DuckE
  0 siblings, 2 replies; 7+ messages in thread
From: Vincent Smeets @ 2001-08-17  8:31 UTC (permalink / raw)


Hallo,

I have installed the GNAT compiler from gnat-3.13p-nt.exe on my
Windows98 computer.

When I compile a file, I can't redirect the output to a file. It will
always be displayed in a window. When there are many errors, I can't see
the first one. I use the command:
	gcc -c prog.adb >errors.txt

Is there a way to get the errors in a file? I use the gvim-editor and it
can then jump directly to the location of the error if it has a file
with the errors..

I'm asking for redirecting the output. I'm not asking for an other
editor which can also jump to the error location!

Thanks,
Vincent

-- Vincent Smeets                    Competence Center Informatik GmbH
-- Tel. : +49-5931-805461            Postfach 1225
-- Fax  : +49-5931-805175            49702 Meppen, Germany
-- mailto:Vincent.Smeets@CCI.Sema.de http://www.CCI.de/
-- PGP fingerprint: E2437E38AAA9CA7D A31E7D751F1B6454 8AED7B76



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Can't redirect output from gnat-3.13p-nt
  2001-08-17  8:31 Can't redirect output from gnat-3.13p-nt Vincent Smeets
@ 2001-08-17 13:28 ` Marin David Condic
  2001-08-17 13:59 ` DuckE
  1 sibling, 0 replies; 7+ messages in thread
From: Marin David Condic @ 2001-08-17 13:28 UTC (permalink / raw)


I believe you can use the -gnatl switch to create a compiler listing. You
can redirect the output of the compiler listing to a file and this will
contain error messages along with the surrounding code. (You'll see the
error messages on the screen but they also go to the listing.) This isn't
exactly what you asked for, but it works pretty well and I generally prefer
having the listing with the error messages anyway.

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com
Web:      http://www.mcondic.com/


"Vincent Smeets" <Vincent.Smeets@CCI.Sema.de> wrote in message
news:3B7CD645.6597796F@CCI.Sema.de...
> Hallo,
>
> I have installed the GNAT compiler from gnat-3.13p-nt.exe on my
> Windows98 computer.
>
> When I compile a file, I can't redirect the output to a file. It will
> always be displayed in a window. When there are many errors, I can't see
> the first one. I use the command:
> gcc -c prog.adb >errors.txt
>
> Is there a way to get the errors in a file? I use the gvim-editor and it
> can then jump directly to the location of the error if it has a file
> with the errors..
>
> I'm asking for redirecting the output. I'm not asking for an other
> editor which can also jump to the error location!
>
> Thanks,
> Vincent
>
> -- Vincent Smeets                    Competence Center Informatik GmbH
> -- Tel. : +49-5931-805461            Postfach 1225
> -- Fax  : +49-5931-805175            49702 Meppen, Germany
> -- mailto:Vincent.Smeets@CCI.Sema.de http://www.CCI.de/
> -- PGP fingerprint: E2437E38AAA9CA7D A31E7D751F1B6454 8AED7B76





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Can't redirect output from gnat-3.13p-nt
  2001-08-17  8:31 Can't redirect output from gnat-3.13p-nt Vincent Smeets
  2001-08-17 13:28 ` Marin David Condic
@ 2001-08-17 13:59 ` DuckE
  2001-08-17 18:15   ` Georg Bauhaus
  2001-08-23  5:42   ` Mats Karlssohn
  1 sibling, 2 replies; 7+ messages in thread
From: DuckE @ 2001-08-17 13:59 UTC (permalink / raw)


Try this one:

  gcc -c proj.adb 2> errors.txt

To redirects the error output (not the standard output) to a file.

SteveD

"Vincent Smeets" <Vincent.Smeets@CCI.Sema.de> wrote in message
news:3B7CD645.6597796F@CCI.Sema.de...
> Hallo,
>
> I have installed the GNAT compiler from gnat-3.13p-nt.exe on my
> Windows98 computer.
>
> When I compile a file, I can't redirect the output to a file. It will
> always be displayed in a window. When there are many errors, I can't see
> the first one. I use the command:
> gcc -c prog.adb >errors.txt
>
> Is there a way to get the errors in a file? I use the gvim-editor and it
> can then jump directly to the location of the error if it has a file
> with the errors..
>
> I'm asking for redirecting the output. I'm not asking for an other
> editor which can also jump to the error location!
>
> Thanks,
> Vincent
>
> -- Vincent Smeets                    Competence Center Informatik GmbH
> -- Tel. : +49-5931-805461            Postfach 1225
> -- Fax  : +49-5931-805175            49702 Meppen, Germany
> -- mailto:Vincent.Smeets@CCI.Sema.de http://www.CCI.de/
> -- PGP fingerprint: E2437E38AAA9CA7D A31E7D751F1B6454 8AED7B76





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Can't redirect output from gnat-3.13p-nt
  2001-08-17 13:59 ` DuckE
@ 2001-08-17 18:15   ` Georg Bauhaus
  2001-08-18  3:14     ` DuckE
  2001-08-23  5:42   ` Mats Karlssohn
  1 sibling, 1 reply; 7+ messages in thread
From: Georg Bauhaus @ 2001-08-17 18:15 UTC (permalink / raw)


DuckE <nospam_steved94@home.com> wrote:
: Try this one:
: 
:  gcc -c proj.adb 2> errors.txt
: 
: To redirects the error output (not the standard output) to a file.

I don't think this will work in command.com, it does not in
Windows NT cmd.exe. But the latter understands 2>&1, maybe this
helps.

Also, I have some vague memories of more usable shell replacements
(4DOS?, pdksh?, bash?) which could provide redirection. You might
have to start gvim from that replacement.

Georg



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Can't redirect output from gnat-3.13p-nt
  2001-08-17 18:15   ` Georg Bauhaus
@ 2001-08-18  3:14     ` DuckE
  0 siblings, 0 replies; 7+ messages in thread
From: DuckE @ 2001-08-18  3:14 UTC (permalink / raw)


I tested on W2K prior to my original post.
I just verified that the same works on NT 4.0 SP6.  It works there too.

If you try this and get an empty file, remember gcc does not produce any
output for a clean compile.  Only when there are errrors.

SteveD

"Georg Bauhaus" <sb463ba@l1-hrz.uni-duisburg.de> wrote in message
news:9ljn0b$3kn$1@a1-hrz.uni-duisburg.de...
> DuckE <nospam_steved94@home.com> wrote:
> : Try this one:
> :
> :  gcc -c proj.adb 2> errors.txt
> :
> : To redirects the error output (not the standard output) to a file.
>
> I don't think this will work in command.com, it does not in
> Windows NT cmd.exe. But the latter understands 2>&1, maybe this
> helps.
>
> Also, I have some vague memories of more usable shell replacements
> (4DOS?, pdksh?, bash?) which could provide redirection. You might
> have to start gvim from that replacement.
>
> Georg





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Can't redirect output from gnat-3.13p-nt
  2001-08-17 13:59 ` DuckE
  2001-08-17 18:15   ` Georg Bauhaus
@ 2001-08-23  5:42   ` Mats Karlssohn
  2001-08-24  4:16     ` DuckE
  1 sibling, 1 reply; 7+ messages in thread
From: Mats Karlssohn @ 2001-08-23  5:42 UTC (permalink / raw)


DuckE wrote:
> 
> Try this one:
> 
>   gcc -c proj.adb 2> errors.txt
> 
> To redirects the error output (not the standard output) to a file.

As I remember it that will not work with the cmd.exe shell (command
interpeter) in Windows NT4. A workable solution is to get CygWin, then
you'll get bash (where the redirection actually works).


-- 
Mats Karlssohn, developer                         mailto:mats@mida.se  
Mida Systemutveckling AB                          http://www.mida.se
Box 64, S-732 22 ARBOGA, SWEDEN
Phone: +46-(0)589-89808   Fax: +46-(0)589-89809



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Can't redirect output from gnat-3.13p-nt
  2001-08-23  5:42   ` Mats Karlssohn
@ 2001-08-24  4:16     ` DuckE
  0 siblings, 0 replies; 7+ messages in thread
From: DuckE @ 2001-08-24  4:16 UTC (permalink / raw)


Forget your memory.  It works!

"Mats Karlssohn" <mats@mida.se> wrote in message
news:3B8497D7.AE88D464@mida.se...
> DuckE wrote:
> >
> > Try this one:
> >
> >   gcc -c proj.adb 2> errors.txt
> >
> > To redirects the error output (not the standard output) to a file.
>
> As I remember it that will not work with the cmd.exe shell (command
> interpeter) in Windows NT4. A workable solution is to get CygWin, then
> you'll get bash (where the redirection actually works).
>
>
> --
> Mats Karlssohn, developer                         mailto:mats@mida.se
> Mida Systemutveckling AB                          http://www.mida.se
> Box 64, S-732 22 ARBOGA, SWEDEN
> Phone: +46-(0)589-89808   Fax: +46-(0)589-89809





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-08-24  4:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-17  8:31 Can't redirect output from gnat-3.13p-nt Vincent Smeets
2001-08-17 13:28 ` Marin David Condic
2001-08-17 13:59 ` DuckE
2001-08-17 18:15   ` Georg Bauhaus
2001-08-18  3:14     ` DuckE
2001-08-23  5:42   ` Mats Karlssohn
2001-08-24  4:16     ` DuckE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox