Subject: Re: Slight gcc -mno-cygwin inconsistency
From: "Gerrit P. Haase" <[email-masked]>
To: "Demmer, Thomas" <[email-masked]>
Cc: "[email-masked]'" <[email-masked]>
Date: Wed, 22 Oct 2003 15:32:12 +0200

Thomas schrieb:

> Why?
> I am not talking about system specific stuff, but
> local user additions.

To add Cygwin specific header && library files there are the paths
/usr/local/include && /usr/local/lib, to add MinGW specific files there
are the paths /usr/local/include/mingw && /usr/local/lib/mingw or use
the same under /usr instead of /usr/local.  These are automatically
searched by GCC, please use it.  Other paths are not searched, we need
to divide the two systems in some way. 

You can always include your own paths with -I/usr/include, then these
are searched at first.

> Take for example libgsl, the GNU Scientific Library.
> I install the headers in /usr/local/include/gsl, the
> cygwin library in /usr/local/lib, and the mingw lib
> in /usr/local/lib/mingw.

Why don't you put the MinGW specific headers in
/usr/local/include/mingw/gsl like the library which is also in ../mingw?
It works in the same way.  If the headers are equal (Cygwin vs. MinGW)
then make a symlink instead of copying.

> gcc -o foo  prog_that_uses_gsl.c -L/usr/local/lib -lgsl
> gives me a cygwin executable,

> gcc -mno-cygwin \
>     -o foo  prog_that_uses_gsl.c -L/usr/local/lib/mingw -lgsl

> would give me the mingw executable. Makes perfect sense to me.

But it is by design that it doesn't work this way.

> There was a thread mostly by a person complaining that mingw and
> cygwin do not work together in an development environment,

They do work together.  You are complaining about the design of Cygwin,
if you don't like it, then change it, you can always submit patches, you
can build your own compiler, all sources are available.  Would be a nice
feature if the compiler could guess whether I want to build a MinGW or a
Cygwin version;-)

Gerrit
-- 
=^..^=

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