Mail Archives: djgpp/1993/06/24/18:09:41
I have followed the discussion of redirecting stderr with some interest.
In order to compile from within my editor, it would be useful to redirect
the GCC error messages to a file. I have tried to do this using the "2R1"
feature of the GO32 environmental variable. For example,
set GO32=2r1 driver c:/djgpp/drivers/tr8900.grn gw 1024 gh 768 nc 256
Unfortunately, it does not always work on my system! Warning messages appear
to get written into a temporary file (rather than to the stdout), which
causes compilation to cease. The following example generates a warning
about redefining the constant X when "2R1" is NOT used, but compilation
progresses and the A.OUT executes normally.
#define X 1
#define X 2
main()
{
printf("%d\n", X);
}
However, when "2R1" is added to the GO32 variable, the compilation halts
with the following error message on stdout:
d:/cc000084:1: parse error before `.'
d:/cc000084:12: malformatted character constant
Is there something obvious I am missing???
- JW
Dr. John M. Weiss, Associate Professor
Department of Mathematics and Computer Science
South Dakota School of Mines and Technology
501 East St. Joseph Street
Rapid City, SD 57701-3995
605-394-6145 jweiss AT silver DOT sdsmt DOT edu
- Raw text -