This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: impure_ptr/Mingw and cygwin

On Mon, Nov 25, 2002 at 05:42:43PM -0800, Andrew DeFaria wrote:
>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:
Apparently not.

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

Because the compiler options specified included -I/usr/include.  He was
responding to your question about "why am i getting this warning".  Your
command line looked like this:

> /bin/gcc -c -g -mno-cygwin -I. -I../../include -I/usr/include/mingw -I/usr/include -DCYGWIN mksf.c
>                                                                        ^^^^^^^^^^^^

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

In the example that you specified there was no hint that it wasn't
found.  In fact, you said "this works" (sic).  You were asking
about a warning.

>(Another side question would be why is /usr/include/mingw listed

You specified -I/usr/include/mingw on the command line and it is already
included by default when you use -mno-cygwin.

Let me say it again.  If you want to compile a windows-only app, you
just use -mno-cygwin.  If you find that some function is missing when
you do this, that means that the function is likely missing from the
mingw distribution.  The solution in this case is not to link in the
bits that you need from cygwin directories.  -mno-cygwin is supposed to
be a world by itself.  You usually can't mix it with cygwin bits and get
anything useful.


Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]