delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/18/22:52:55

X-Spam-Check-By: sourceware.org
Message-ID: <43F76CF4.7030001@byu.net>
Date: Sat, 18 Feb 2006 11:52:36 -0700
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
MIME-Version: 1.0
To: skaller <skaller AT users DOT sourceforge DOT net>
CC: cygwin AT cygwin DOT com
Subject: Re: Linux vs Cygwin linkage
References: <1140287981 DOT 4091 DOT 76 DOT camel AT rosella DOT wigram>
In-Reply-To: <1140287981.4091.76.camel@rosella.wigram>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to skaller on 2/18/2006 11:39 AM:
> I have found some unexpected differences between Cygwin
> and Linux. FYI I think Cygwin is right, and Linux is wrong.

No, they are both right, in their own way.  Windows .dlls cannot use
undefined symbols, whereas Linux shared objects can (the dynamic loader
resolves them lazily, failing only at execution time if the symbol was not
ultimately provided).  Libtool has a -no-undefined switch to force
platforms like Linux with lazy linking to have a link failure if the
symbol is undefined, whereas on Windows, you have no choice.  For
development, it is sometimes easier to rely on lazy linkage (or linux
wouldn't provide it), but for portability, you are right that cygwin is
stricter thanks to the underlying windows dll semantics.

> Can I fix that with
> 
> 	-Wl,--no-allow-shlib-undefined
> 
> switch to gcc, so Linux and Cygwin behave the same?

Why not look at what the -no-undefined switch to libtool uses?

- --
Life is short - so eat dessert first!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD92z084KuGfSFAYARAkN6AJ4uTkDeijRB1Vw4SkIQmKyG6+8jSwCeKOAA
dIFCKjRLT2RpDsIX8IQfd4E=
=RJ4I
-----END PGP 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