Article View: comp.os.os2.programmer
Article #983Re: gcc error in <stdio.h>
From: David Charlap
Date: Wed, 26 Aug 1992 21:00
Date: Wed, 26 Aug 1992 21:00
40 lines
2287 bytes
2287 bytes
In article <1992Aug25.210547.128@physc1.byu.edu> robertson@physc1.byu.edu writes:
> I just started using gcc today. I am new to c programming as well.
> After installing gcc for OS/2 and following the directions in the
> README and INSTALL files in the \gnu\doc directory, I read through
> the first 30-40 pages about the command line parameters. I thought
> I understood so I tried to invoke the command from the gnu directory:
>
> gcc samples\sample1.c -ansi -pedantic -g
>
> which tells me that I have an error:
>
> E:\GNU\GCC-INCLUDE/stdio.h:313: syntax error before `int'
>
> I assumed that 313 meant in line 313 so I looked it up
> It is this:
> static inline int__sputc[int_c, FILE *_p] {
> ^^^^^^
> I deleted this word and now it works. I thought to delete it
> because when I looked up static in my c book it always preceded a
> variable type. So I tried it. Why does it now work? Did I mess
> the header up at all?
Don't use the "Pedantic" parameter. You also can't link with gcc/2.
Try this:
gcc -c sample1.c
link386 sample1.obj;
For sample2 and sample3, you're going to have to include a "collect"
step. See the Makefile file that's included in the samples directory.
The Makefile contains instructions to build the sample code - if you
have a MAKE utility, run it using Makefile as the input file.
Otherwise, try to figure out the contents of the file (it isn't too
difficult) and follow what it says.
--
|) David Charlap "I don't even represent myself
/|_ dic5340@hertz.njit.edu sometimes so NJIT is right out!.
((|,)
~|~ Hi! I am a .signature virus, copy me into your .signature file.
Technical Details
Message-ID:
<1992Aug26.210017.24301@njitgw.njit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!elroy.jpl.nasa.gov!sdd.hp.com!swrinde!mips!darwin.sura.net!jvnc.net!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340References:
<1992Aug25.210547.128@physc1.byu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!elroy.jpl.nasa.gov!sdd.hp.com!swrinde!mips!darwin.sura.net!jvnc.net!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340 From: dic5340@hertz.njit.edu (David Charlap) Newsgroups: comp.os.os2.programmer Subject: Re: gcc error in <stdio.h> Message-ID: <1992Aug26.210017.24301@njitgw.njit.edu> Date: 26 Aug 92 21:00:17 GMT References: <1992Aug25.210547.128@physc1.byu.edu> Sender: news@njit.edu Organization: New Jersey Institute of Technology, Newark, N.J. Lines: 40 Nntp-Posting-Host: hertz.njit.edu