delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/07/12/02:11:36

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
Date: Mon, 12 Jul 2004 10:10:05 +0400
From: boekhold AT emirates DOT net DOT ae
Subject: Re: Building DLL
To: cygwin AT cygwin DOT com
Message-id: <18b27f187b2a.187b2a18b27f@emirates.net.ae>
MIME-version: 1.0
X-IsSubscribed: yes

Hi all,

I've been trying the suggestions mentioned on this list:

1. Create an import library
echo EXPORTS > foo.def
nm foo.exe | grep ' T _' | sed 's/.* T _//' >> foo.def
dlltool --def foo.def --dllname foo.exe --output-lib foo.a

I couldn't get this to work. In the executable I am trying to load the
library using g_module_open (from glib2.0), which fails no matter what I
specify for the library name.

2. use __attribute__ ((__dllexport__)) / __attribute__ ((__dllimport__))

compiled with:
> gcc -shared -o my_dll.dll dll.def dll.c
> gcc -o my_exe.exe exe.c  my_dll.dll

Following the suggestions from Danny Smith, I *do* manage to get this
working. However, I'm a little hazy about how to use this method within 
XFCE.

The above compile command creates a my_dll.dll, and g_module_open
manages to open this library. However, XFCE uses libtool for
compiling/linking, and this creates a 'cygmy_dll.dll' in addition to
libmy_dll.dll.a and libmy_dll.la.

In short, I'm not sure how I can integrate this method with all the
automake/libtool stuff.

Does anybody have an example of how to use this method together with
automake/libtool?

Kind regards,

Maarten


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