home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / os2 / programm / 4246 < prev    next >
Encoding:
Text File  |  1992-08-16  |  1.6 KB  |  36 lines

  1. Path: sparky!uunet!wupost!darwin.sura.net!jvnc.net!yale.edu!yale!gumby!wmichgw!x91clifton1
  2. From: x91clifton1@gw.wmich.edu
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Re: Problem with EMX-0.8d
  5. Message-ID: <1992Aug16.200715.4984@gw.wmich.edu>
  6. Date: 16 Aug 92 20:07:15 EST
  7. References: <Bt0F2I.M6r@bunyip.cc.uq.oz.au>
  8. Organization: Western Michigan University
  9. Lines: 25
  10.  
  11. In article <Bt0F2I.M6r@bunyip.cc.uq.oz.au>, coates@newton.physics.uq.oz.au (Tony Coates) writes:
  12. > I have just installed emx-0.8d (i.e. g++ for OS/2 v2.0), and tried to
  13. > make the files in the directory "\emx\test" using "make".  Everything
  14. > was O.K. until the compilation of the file "hexdump.c".  The compilation
  15. > terminated with the error "`optswchar' undeclared".  This "char"
  16. > variable is used without declaration in "hexdump.c".  A look at the code
  17. > suggested that "optswchar" should be declared in "getopts.h", but isn't.
  18. > A search of all files on the disk only found the string "optswchar" in
  19. > the files "hexdump.c" and "libc.a", which suggest that a declaration of
  20. > "optswchar" has been omitted somewhere.  Can anyone help me with this?
  21. > Thanks in advance for any help/advice.
  22. >                                 Tony.
  23.  
  24. The declaration should be in _getopt.h_ not getopts.h:
  25.  
  26. extern char *optswchar;  /* character introducing options; default="-" */ 
  27.  
  28. As you can see defining it as "-" is rather (hexdump.c) redundant. Check 
  29. your sources from emx-08d and make sure you have the correct include for
  30. getopt(). Also note that defining optind=0 is also redundant while opterr
  31. defaults to TRUE (display error message on unknown switch).
  32.  
  33. /Doug
  34. --
  35. Douglas Clifton [99clifto@lab.cc.wmich.edu]
  36.