This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Building a vendor perl module with gcc under cygwin
- From: Philip Kime <philkime at kime dot org dot uk>
- To: cygwin at cygwin dot com
- Date: Wed, 18 May 2011 15:38:04 +0200
- Subject: Building a vendor perl module with gcc under cygwin
- Reply-to: Philip at kime dot org dot uk
Greetings,
I am having a hell of time trying to build a vendor-supplied perl
module under gcc in cygwin. I know it compiles with gcc under Linux
and Unix, as well as with VC under windows. I'm using cygwin 1.7.9 and
gcc 4.3.4. This is 64-bit windows.
The module creates a .dll which needs to link to one other vendor
supplied library for which I have the .dll and .lib import library.
I'm using the 32-bit version of the library I need.
I have managed to get as far as building the module .dll but when I
try to load it, I get (module is called "MOD" below):
Can't load 'blib/arch/auto/MOD/MOD.dll' for module MOD: Exec format
error at /usr/lib/perl5/5.10/i686-cygwin/DynaLoader.pm line 200.
When I look at the MOD.dll with ldd, I get:
ntdll.dll => /cygdrive/c/Windows/SysWOW64/ntdll.dll (0x77c40000)
kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x76020000)
KERNELBASE.dll => /cygdrive/c/Windows/syswow64/KERNELBASE.dll
(0x77420000)
??? => ??? (0x6e300000)
which doesn't look good. It's not clear to me which flags I need to
pass to gcc. I believe that I shouldn't use "-mdll" any more. I tried
"-shared" but this gives me undefined SSP symbols.
nm output for MOD.dll looks normal.
Any ideas appreciated.
--
Dr Philip Kime
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple