home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / os2 / programm / 4460 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  2.2 KB

  1. Path: 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
  2. From: dic5340@hertz.njit.edu (David Charlap)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Re: gcc error in <stdio.h>
  5. Message-ID: <1992Aug26.210017.24301@njitgw.njit.edu>
  6. Date: 26 Aug 92 21:00:17 GMT
  7. References: <1992Aug25.210547.128@physc1.byu.edu>
  8. Sender: news@njit.edu
  9. Organization: New Jersey Institute of Technology, Newark, N.J.
  10. Lines: 40
  11. Nntp-Posting-Host: hertz.njit.edu
  12.  
  13. In article <1992Aug25.210547.128@physc1.byu.edu> robertson@physc1.byu.edu writes:
  14. >   I just started using gcc today.  I am new to c programming as well.
  15. >   After installing gcc for OS/2 and following the directions in the
  16. >   README and INSTALL files in the \gnu\doc directory, I read through
  17. >   the first 30-40 pages about the command line parameters.  I thought
  18. >   I understood so I tried to invoke the command from the gnu directory:
  19. >
  20. >          gcc samples\sample1.c -ansi -pedantic -g
  21. >
  22. >   which tells me that I have an error:
  23. >
  24. >          E:\GNU\GCC-INCLUDE/stdio.h:313: syntax error before `int'
  25. >
  26. >   I assumed that 313 meant in line 313 so I looked it up
  27. >   It is this:
  28. >          static inline int__sputc[int_c, FILE *_p] {
  29. >                  ^^^^^^
  30. >    I deleted this word and now it works.  I thought to delete it
  31. >    because when I looked up static in my c book it always preceded a
  32. >    variable type.  So I tried it.   Why does it now work?  Did I mess
  33. >    the header up at all?
  34.  
  35. Don't use the "Pedantic" parameter.  You also can't link with gcc/2.
  36. Try this:
  37.  
  38. gcc -c sample1.c
  39. link386 sample1.obj;
  40.  
  41. For sample2 and sample3, you're going to have to include a "collect"
  42. step.  See the Makefile file that's included in the samples directory.
  43. The Makefile contains instructions to build the sample code - if you
  44. have a MAKE utility, run it using Makefile as the input file.
  45. Otherwise, try to figure out the contents of the file (it isn't too
  46. difficult) and follow what it says.
  47.  
  48. -- 
  49.    |)  David Charlap           "I don't even represent myself
  50.   /|_  dic5340@hertz.njit.edu   sometimes so NJIT is right out!.
  51.  ((|,)
  52.   ~|~  Hi! I am a .signature virus, copy me into your .signature file.
  53.