[C++-sig] Trouble with Py++/boost.python

Robert O'Callahan ropoctl at gmail.com
Mon Jan 29 22:04:07 CET 2007


Thanks, I got it to build a .so.  But python doesn't import it.
"ImportError: ./opennurbs.so: undefined symbol: _ZTI8ON_Curve"  I dunno how
it missed a class.

I also tried to build bindings for Irrlicht:

gcc.compile.c++ ../../../bin.v2/libs/python/irrlicht/gcc-4.1.1
> /debug/bindings.o
> /home/ropoctl/boost_1_34_pre20061214/libs/python/irrlicht/irrlicht-1.2/include/ISceneUserDataSerializer.h:25:
> warning: 'class irr::scene::ISceneUserDataSerializer' has virtual functions
> but non-virtual destructor
> ../../../boost/python/object/make_instance.hpp: In static member function
> 'static PyObject* boost::python::objects::make_instance_impl<T, Holder,
> Derived>::execute(Arg&) [with Arg = char*, T = char, Holder =
> boost::python::objects::pointer_holder<char*, char>, Derived =
> boost::python::objects::make_ptr_instance<char,
> boost::python::objects::pointer_holder<char*, char> >]':
> ../../../boost/python/to_python_indirect.hpp:96:   instantiated from
> 'static PyObject* boost::python::detail::make_reference_holder::execute(T*)
> [with T = char]'
> ../../../boost/python/to_python_indirect.hpp:60:   instantiated from
> 'PyObject* boost::python::to_python_indirect<T, MakeHolder>::execute(const
> U&, mpl_::false_) const [with U = char, T = const char* const, MakeHolder =
> boost::python::detail::make_reference_holder]'
> ../../../boost/python/to_python_indirect.hpp:48:   instantiated from
> 'PyObject* boost::python::to_python_indirect<T, MakeHolder>::execute(U*,
> mpl_::true_) const [with U = const char, T = const char* const, MakeHolder =
> boost::python::detail::make_reference_holder]'
> ../../../boost/python/to_python_indirect.hpp:37:   instantiated from
> 'PyObject* boost::python::to_python_indirect<T,
> MakeHolder>::operator()(const U&) const [with U = const char*, T = const
> char* const, MakeHolder = boost::python::detail::make_reference_holder]'
> ../../../boost/python/detail/invoke.hpp:88:   instantiated from 'PyObject*
> boost::python::detail::invoke(boost::python::detail::invoke_tag_<false,
> true>, const RC&, F&, TC&, AC0&) [with RC =
> boost::python::to_python_indirect<const char* const,
> boost::python::detail::make_reference_holder>, F = const char* const
> (pyplusplus::containers::static_sized::const_array_1_t<const char*,
> 5ul>::*)(long unsigned int)const, TC =
> boost::python::arg_from_python<pyplusplus::containers::static_sized::const_array_1_t<const
> char*, 5ul>&>, AC0 = boost::python::arg_from_python<long unsigned int>]'
> ../../../boost/python/detail/caller.hpp:199:   instantiated from
> 'PyObject* boost::python::detail::caller_arity<2u>::impl<F, Policies,
> Sig>::operator()(PyObject*, PyObject*) [with F = const char* const
> (pyplusplus::containers::static_sized::const_array_1_t<const char*,
> 5ul>::*)(long unsigned int)const, Policies =
> boost::python::return_internal_reference<1u,
> boost::python::default_call_policies>, Sig = boost::mpl::vector3<const char*
> const, pyplusplus::containers::static_sized::const_array_1_t<const char*,
> 5ul>&, long unsigned int>]'
> ../../../boost/python/object/py_function.hpp:38:   instantiated from
> 'PyObject*
> boost::python::objects::caller_py_function_impl<Caller>::operator()(PyObject*,
> PyObject*) [with Caller = boost::python::detail::caller<const char* const
> (pyplusplus::containers::static_sized::const_array_1_t<const char*,
> 5ul>::*)(long unsigned int)const,
> boost::python::return_internal_reference<1u,
> boost::python::default_call_policies>, boost::mpl::vector3<const char*
> const, pyplusplus::containers::static_sized::const_array_1_t<const char*,
> 5ul>&, long unsigned int> >]'
> bindings.cpp:613:   instantiated from here
> ../../../boost/python/object/make_instance.hpp:24: error: invalid
> application of 'sizeof' to incomplete type
> 'boost::STATIC_ASSERTION_FAILURE<false>'
>
>     "g++"  -ftemplate-depth-128 -O0 -fno-inline -Wall -g -fPIC
> -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_DYNAMIC_LIB  -I"../../.."
> -I"/usr/include/python2.4" -c -o "../../../bin.v2/libs/python/irrlicht/gcc-
> 4.1.1/debug/bindings.o" "bindings.cpp"
>
> ...failed gcc.compile.c++ ../../../bin.v2/libs/python/irrlicht/gcc-4.1.1
> /debug/bindings.o...
> ...skipped <p../../../bin.v2/libs/python/irrlicht/gcc-4.1.1/debug>
> irrlicht.so for lack of <p../../../bin.v2/libs/python/irrlicht/gcc-4.1.1
> /debug>bindings.o...
> ...failed updating 1 target...
> ...skipped 1 target...




-Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20070129/85405f78/attachment.htm>


More information about the Cplusplus-sig mailing list