Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: From: Ben Miller To: "'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) Content-Type: text/plain; charset="iso-8859-1" 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