Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Reply-To: <Peter.Bienstman@rug.ac.be>
From: "Peter Bienstman" <Peter.Bienstman@rug.ac.be>
To: <cygwin@sources.redhat.com>
Subject: Re:building Python extension modules - crash on import
Date: Fri, 3 Aug 2001 16:57:39 +0200
Message-ID: <006101c11c2c$a49ee4e0$0454c19d@intec.rug.ac.be>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2377.0
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Importance: Normal

To follow up on my own post, I've noticed that Python distutils under Cygwin
does not link to /usr/bin/libpython2.1.dll, but rather
to -L/usr/lib/python2.1/config -lpython2.1, which is a different library.

Anyway, when I try this new approach, the linking stage fails due to extra
leading underscores in object files. Since this is the same problem as in
http://www.cygwin.com/ml/cygwin/2001-07/msg01699.html , I'll append what
I've done and my problems to that thread.

>Hi,
>
>I'm trying to build a simple C++ Python extension module under the latest
>cygwin.
>
>The module's name is 'convert'. After compiling convert.o as usual, I
>created a convert.def containing
>
>EXPORTS
>	initconvert
>
>I then used this command to build the dll:
>
>dllwrap --dllname convert.dll --driver-name=g++ --def convert.def \
>	-o convert.dll -s --entry _DllMain@12 \
>	convert.o $(BOOST_LIB)/libboost_python.a \
>	/usr/bin/libpython2.1.dll
>
>This creates the dll without problems, but when I try to use it, I get a
>segmentation fault:


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

