delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/25/20:45:14

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
Message-ID: <3DE2D193.9040906@Salira.com>
Date: Mon, 25 Nov 2002 17:42:43 -0800
From: Andrew DeFaria <ADeFaria AT Salira DOT com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en, ru, zh
MIME-Version: 1.0
Newsgroups: gmane.os.cygwin
To: cygwin AT cygwin DOT com
Subject: Re: impure_ptr/Mingw and cygwin
References: <Pine DOT LNX DOT 4 DOT 21 DOT 0211251615350 DOT 7231-100000 AT gremlin DOT fruitbat DOT org> <3DE2C59A DOT 9030103 AT Salira DOT com> <20021126012120 DOT GC13548 AT redhat DOT com>
X-OriginalArrivalTime: 26 Nov 2002 01:44:02.0984 (UTC) FILETIME=[4C680280:01C294ED]

Christopher Faylor wrote:

> [one more for the archives]
> On Mon, Nov 25, 2002 at 04:51:38PM -0800, Andrew DeFaria wrote:
>
>> If this were really so then why, if I don't specify -I/usr/include I 
>> get  getopt.h not found?!? I should be found in /usr/include/getopt.h no?
>
> /usr/include is for cygwin apps. If you add -I/usr/include you subvert 
> the normal operation of -mno-cygwin by including cygwin-only header 
> files which is *specifically* what -mno-cygwin is avoiding. The system 
> include area for -mno-cygwin is /usr/include/mingw.

Understood, however Peter did say:

If you add the "-v" flag to you compile flags, gcc will dump the list of directories it searches for include files.  In this case it would be:

 ../../include
 /usr/include/mingw
 /usr/include
 /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/include
 /usr/include/mingw
 /usr/include/w32api

So mine was more of a question: If as Peter says /usr/include is the 3rd 
library searched, why isn't getopt.h being found? (Another side question 
would be why is /usr/include/mingw listed twice?).

>> In any event, after reading up on this problem in the MingW mailing 
>> list  I find that I am not the only one with this problem. Seems that 
>> -liberty  does indeed have the code for getopt but there is no mingw 
>> header file  that defines the interface. My solution ended up being 
>> define the getopt  API by hand and put it in my own mksf.h header 
>> file. Ugly but it works.
>
> Did you send a bug report or patch to the mingw mailing list?

Didn't really want to have to sign up for yet another account on another 
mailing list, yadda, yadda. It seemed to me that they were aware of the 
problem already so why should I bother to report a problem that is 
already known?


--
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/

- Raw text -


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