delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/08/11:35:43

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: <F562D0DC54E1D211B2A6009027465034D6246D@exchange>
From: Ben Miller <Ben DOT Miller AT Mercia DOT Com>
To: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Subject: Building a Win32 DLL using g++.
Date: Thu, 8 Mar 2001 16:31:23 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)

Hi all,

I've recently started using the cygwin GCC implementation and I'm
having problems trying to create a Win32 DLL.  I created a DLL and
exported a single function using __declspec(dllexport).  My source
file is called cimp.cc and has only the function definition in it.

I tried executing the following (after compiling using 'g++ -c
cimpl.cc'):

dlltool -l cimpl.lib cimpl.obj

ld -Map cimpl.map -e 0 -E -o cimpl.dll cimpl.lib

The problem is that although the .lib file appears to have my
(decorated) function name in it, the generated .dll file does not.
I'm not really that clear on the full abilities of the dlltool and ld
tools, so I'm probably using them wrong.  Do I even need to use ld?
By it's name dlltool sounds like it ought to do th job!

Also, can you tell me if I specifying the entry point correctly (using
'-e 0')?  If I don't use this, dlltool seems to think that I want to
build a .exe file and subsequently fails looking for WinMain.  Is
using a value of zero going to work (I have not DllMain specified in
my code)?

Best regards,
Ben Miller


Mercia Software Ltd.
Mercia House 
Ashted Lock
Aston Science Park
Birmingham B7 4AZ, UK 
Registered Number: 1868855 (Cardiff) 
Tel: 44 (0)121 359 5096 
Fax: 44 (0)121 359 0375 
Web Site: http://www.mercia.com 




--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019