Problem with getopt when compiling

Gerrit Cap Gerrit.Cap@marble.be
Sat Dec 28 20:10:00 GMT 2002


Hello

I've downloaded a C++ source archiuve and when compiling I got an error 
which I traced down to two different definitions of getopt().

The sources include /usr/include/unistd.h
this file includes /usr/include/sys/unistd.h which defines getopt as:

>int      getopt(int, char * const [], const char *);

and it also includes /usr/include/getopt.h which defines getopt as:

>int getopt (int, char * const *, const char *);

Of course this is the same definition but it is still different enough to 
force a compiler error.

rather annyoing...

Gerrit.


-------------------- Marble Consulting ----------------------
Gerrit Cap                      http://www.marble.be/
OO Solutions Engineer           mailto:Gerrit.Cap@marble.be
Marble Consulting
Blauwe Gaanweg, 53              tel : +32 475  72.94.36
B-9150 Kruibeke-Bazel           fax : +32 3   744.19.17
Belgium
-------------------- Marble Consulting ----------------------
There is only one thing in the world worse than being witty,
and thats not being witty.          (Monthy Python)



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list