delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/09/18/17:32:33

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
From: Rolf Campbell <Endlisnis AT mailc DOT net>
Subject: Re: getopt: ugly linker messages
Date: Thu, 18 Sep 2003 17:32:22 -0400
Lines: 25
Message-ID: <bkd896$8vs$1@sea.gmane.org>
References: <200309182018 DOT h8IKIVWa019609 AT bolt DOT sonic DOT net>
Mime-Version: 1.0
X-Complaints-To: usenet AT sea DOT gmane DOT org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030723 Thunderbird/0.1
X-Accept-Language: en-us, en
In-Reply-To: <200309182018.h8IKIVWa019609@bolt.sonic.net>

Bryan Higgins wrote:
> Christopher Faylor wrote:
> 
> 
>>You can use unistd.h if you want.  If you knew this already why were you
>>asking the question?
> 
> 
> From the gnu getopt(3) man page (mysteriously missing in cygwin):
> 
>        #include <unistd.h>
> 
>        int getopt(int argc, char * const argv[],
>                   const char *optstring);
> 
>        extern char *optarg;
>        extern int optind, opterr, optopt;
> 
> If one does this with the latest cygwin, ugly linker messages result.
> 

I believe you are interpreting the man page incorrectly.  You should 
only include <unistd.h> and not the 4 lines below that.  The rest of the 
lines are only to show you the signature.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019