From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24005 invoked by alias); 18 May 2011 13:38:41 -0000 Received: (qmail 23928 invoked by uid 22791); 18 May 2011 13:38:40 -0000 X-SWARE-Spam-Status: No, hits=4.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mail-fx0-f43.google.com (HELO mail-fx0-f43.google.com) (209.85.161.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 May 2011 13:38:26 +0000 Received: by fxm3 with SMTP id 3so1543894fxm.2 for ; Wed, 18 May 2011 06:38:24 -0700 (PDT) Received: by 10.204.134.207 with SMTP id k15mr1953064bkt.135.1305725904681; Wed, 18 May 2011 06:38:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.75.89 with HTTP; Wed, 18 May 2011 06:38:04 -0700 (PDT) Reply-To: Philip@kime.org.uk From: Philip Kime Date: Wed, 18 May 2011 13:38:00 -0000 Message-ID: Subject: Building a vendor perl module with gcc under cygwin To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-05/txt/msg00254.txt.bz2 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