delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/08/06/12:18:06

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3B6EC220.6EEE7D@ece.gatech.edu>
Date: Mon, 06 Aug 2001 12:13:20 -0400
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 sun4u)
X-Accept-Language: en
MIME-Version: 1.0
To: Josep Lluis Colom <jllcolom AT bpo DOT hp DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: Shared library question
References: <3B6EA1F1 DOT CCBEC082 AT bpo DOT hp DOT com>

Josep Lluis Colom wrote:
> 
> I used autoconf/automake/libtool to write a package that builds two
> shared libraries in Linux, and it worked as expected.
> Now I'm trying to do the port to Windows.
> 
> After installing Cygwin software. I can't build the shared libraries.
> After compiling the source modules, libtool complains with: "Warning:
> undefined symbols not allowed in i686-pc-cygwin shared libraries". Only
> '.a', '.la' and '.lai' files are built.

Correct. Current (and CVS) versions of libtool do not easily build
shared libs (DLLs) on cygwin.  This will probably be corrected in the
coming months, thanks to yesterday's new (experimental) binutils
release.

There is a hacked up version of libtool that uses pre-release versions
of automake, binutils[as of yesterday, no longer pre-release], and
friends to 'cleanly' build shared libs -- but it is a long way from even
making it into libtool CVS, much less an 'official' libtool release.

> Someone knows what its the pitfall?

"doctor, it hurts when it do this"  "Don't do that".

You basically have three choices:
 a) live with static libs only
 b) wait a few months until the tools 'catch up'. (perhaps help
develop/test those tools?)
 c) hack up your source code to explicitly build DLLs.  This requires a
lot of 'heavy lifting'.  Take a look at the patch to the ncurses
package, for an idea of what this entails.  (Download the source package
from a cygwin mirror, and look in <ncurses-src>/CYGWIN-PATCHES/)

> (I'm using the same source files I used in Linux platform. Is that ok?
> Shall I define some kind of dllexport like in plain Windows DLLs?

Yep.

> There's some clear sample hot to do it?)

Well, other than the ncurses example, you can download dllhelpers-0.2.6
(NOT 0.2.7) from cygutils.  (See recent ANN on this mailing list for
URL).

--Chuck

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