Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <013401c28a98$a2fc48e0$78d96f83@pomello>
From: "Max Bowsher" <maxb@ukf.net>
To: "Garrett Banuk" <mongoose@magic.shiman.com>, <cygwin@cygwin.com>
References: <Pine.GSO.4.33.0211121644370.5111-100000@magic.shiman.com>
Subject: Re: Importing symbols from .exe's
Date: Tue, 12 Nov 2002 22:12:49 -0000
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

Garrett Banuk <mongoose@magic.shiman.com> wrote:

> Hello. We are trying to build a library that references symbols from
> an executable. How it works is the executable loads up and then loads
> the dynamic library. The library can then implicitly reference
> symbols inside the executable. This works fine under Linux and
> Solaris.
>
> Under Cygwin I am having problems building this library. I get the
> error "undefined reference to `XXX`" for all the symbols. The library
> has no problem resolving symbols that are in other libraries, but
> fails on the symbols in the executable.
>
> So how do I build this library? The symbols can not be resolved until
> runtime when the executable loads up the library. Thanks.

Windows' dynamic loader isn't powerful enough to do what you want. I think
that Apache takes the approach of putting the symbols that need to be shared
into a second library, which the original program and library both import.

Max.


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

