delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/22/09:33:34

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
Date: Wed, 22 Oct 2003 15:32:12 +0200
From: "Gerrit P. Haase" <gerrit AT familiehaase DOT de>
Reply-To: "Gerrit P. Haase" <gerrit AT familiehaase DOT de>
Organization: Esse keine toten Tiere
X-Priority: 3 (Normal)
Message-ID: <1581826398241.20031022153212@familiehaase.de>
To: "Demmer, Thomas" <TDemmer AT krafteurope DOT com>
CC: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Subject: Re: Slight gcc -mno-cygwin inconsistency
In-Reply-To: <8D861ADC5B8FD211B4100008C71EA7DA04F71254@kjsdemucshrexc1.eu.pm.com>
References: <8D861ADC5B8FD211B4100008C71EA7DA04F71254 AT kjsdemucshrexc1 DOT eu DOT pm DOT com>
MIME-Version: 1.0

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/

- Raw text -


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