building Python extension modules - crash on import

Peter Bienstman Peter.Bienstman@rug.ac.be
Thu Aug 2 06:28:00 GMT 2001


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:

>>>from convert import *
	0 [main] python 406 open_stackdumpfile: Dumping stack trace to
python2.1.exe.stackdump
Segmentation fault (core dumped)

Under Unix, I got everything working without problems.

Any insights?

Thanks,

Peter

-------------------------------------
Peter Bienstman
Department of Information Technology
INTEC/IMEC - Ghent University
St.-Pietersnieuwstraat 41
B-9000 Gent - Belgium
E-mail: Peter.Bienstman@rug.ac.be
Tel: +32 9 264 3445
Fax: +32 9 264 3593
-------------------------------------


--
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/



More information about the Cygwin mailing list