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