delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/02/03:32:15

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
Subject: Re: Help: linking a dll which uses runtime symbol on cygwin
From: Robert Collins <robert DOT collins AT itdomain DOT com DOT au>
To: Chia-liang Kao <clkao AT clkao DOT org>
Cc: cygwin AT cygwin DOT com
In-Reply-To: <20010830084455.A29690@clk.cirx.org>
References: <20010830084455 DOT A29690 AT clk DOT cirx DOT org>
X-Mailer: Evolution/0.12 (Preview Release)
Date: 02 Sep 2001 17:32:23 +1000
Message-Id: <999415945.16271.1.camel@lifelesswks>
Mime-Version: 1.0

On 30 Aug 2001 08:44:55 +0800, Chia-liang Kao wrote:
> Hi,
> 
> I'm porting a program developed on FreeBSD to cygwin and encounter
> some problems with linking.
> 
> The problem is mainly about the perl extension. The main program
> exports some symbol for the plugins written in perl to use (via XS),
> and invokes the plugins by some function in libperl5_6_1.dll.
> 
> Sorry that I'm very unfamiliar with win32. I asked several people and
> digged the mailing list. I somewhat know about the implib/declspec,
> which seems to exist for some historical issues. I also played with
> the --auto-import patched ld but in vain.
> 
> Anyway, to simplify and show the scenario clearly:
> 
> * A (main program)
>   + links with B (libperl)
> 
> * C (the plugin glueware)
>   + uses some symbols from both A and B
>   + is loaded by B while A is running
> 
> on FreeBSD, I just cc -share C.o -o C.so, the unresolved symbols won't
> make any trouble.
> 
> So how do I get the C.dll on cygwin?

Create an export library for A, and ensure that it exports the symbols.

PE - the win32 loader format - doesn't automatically export all the
symbols, and unresolved symbols at link time are not allowed.

Rob


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