Subject: Can I use getopt in a simple program with cygwin32 ?
From: [email-masked] (Cormac McGuinness)

10 Feb 1998 20:40:09 -0800
Message-ID: <[email-masked]>
To: [email-masked]

Hi,

I have a simple program that is command line driven and calls getopt
within the program, however when i compile it using "gcc file.c" I get
file.c: in function 'main':
file.c:47: 'optarg' undeclared (first use this function)
file.c:47: (Each undeclared identifier is reported only once
file.c:47: for each function it appears in.)
file.c:91: 'optopt' undeclared (first use this function)

What is going on? The same source code compiles under Linux and HP-UX no 
problem... can I not use the optopt and optarg and optind variables that
i would expect the calling of the function getopt to set ???

Please e-mail me a reply, as I do not subscribe to the mailing list, but
searched through the archives for an answer.....

Thanks in advance
Cormac
--
-------------------------------------------------------------------------------
Cormac McGuinness                       e-mail: [email-masked]
                                                [email-masked]
===============================================================================
Experimental Physics Department,        Tel:    + 353 1 706 2205
University College Dublin,              Fax:    + 353 1 283 7275
Belfield, Dublin 4, Ireland.            
        Also:
School of Physical Sciences,            Tel:    + 353 1 704 5840
Dublin City University,                 Fax:    + 353 1 704 5384
Glasnevin, Dublin 9, Ireland

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".