Subject: RE: building Python extension modules - crash on import
From: "Norman Vine" <[email-masked]>
To: <[email-masked]>, "'Jason Tishler'" <[email-masked]>
Cc: <[email-masked]>
Date: Mon, 6 Aug 2001 10:02:27 -0400

Peter Bienstman writes:
>
>> If you can refer me to a self contained (i.e. not dependent on other
>> libraries, etc.) Python C++ extension, then I'm willing to fiddle around
>> with it.
>
>Attached are a simple C++ file convert.cpp and a makefile. The Python
>extension does however require the Boost Python Library 
>(www.boost.org), a
>C++ system to create Python extension modules.
>
>The linking fails with errors like:
>
>convert.o(.complex<double>
>boost::python::detail::text$complex_from_python<double>(_object *,
>boost::python::type<double>)+0x10):convert.cpp: undefined reference to
>`PyInt_Type'
>../
>/users/pbienst/tmp/boost_cvs/libs/python/src/libboost_python.a(
>extension_cla
>ss.o)(.text+0x3ad):extension_class.cpp: undefined reference to
>`PyExc_RuntimeError'
>...
>
>These are symbols which I suppose must be in libpython2.1.

Try the attached Makefiles

The second Makefile goes in 
$BOOST / libs / python / build

then cd into above directory and 
% make
then to make sure things are working < well almost >
% cd ../test
% python doctest.py -v
< I get 52 passed and 1 failure on above >

then try making your test program

FYI  -- 
I have Cygwin mounted at '/'
and $BOOST at '/src/boost'
adjust Makefiles according to your system

I also am using the latest Cygwin snapshot 
and a locally compiled Python 2.1
< neither probably matters >

Cheers

Norman Vine

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