[C++-sig] Next problem with boost python

Berthold Höllmann hoel at germanlloyd.org
Mon Jul 15 17:55:17 CEST 2002


Hello,

I just tried the example from 

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/boost/boost/li
bs/python/doc/v2/module.html

#include <boost/python/module.hpp>

using namespace boost::python;

char const* greet()
{
    return "hello, Boost.Python!";
}

BOOST_PYTHON_MODULE_INIT(boost_greet)
{
  boost::python::module("boost_greet")
    .def("greet", greet);
}

I got it to compile and linked it against libboost_python from

.../boost/libs/python/build/bin/libboost_python.so/gcc/release/inlining-
on/runtime-link-dynamic/shared-linkable-true

but when I try to import the new generated module I get 

    import boost_greet
ImportError: ld.so.1: python: fatal: relocation error: file
./boost_greet.so: symbol
_ZN5boost6python7objects8functionC1ENS_9function2IP7_objectS5_S5_NS_21em
pty_function_policyENS_20empty_function_mixinESaINS_13function_baseEEEEj
j: referenced symbol not found

>c++filt
_ZN5boost6python7objects8functionC1ENS_9function2IP7_objectS5_S5_NS_21em
pty_function_policyENS_20empty_function_mixinESaINS_13function_baseEEEEj
j
boost::python::objects::function::function[in-charge](boost::function2<_
object*, _object*, _object*, boost::empty_function_policy,
boost::empty_function_mixin, std::allocator<boost::function_base> >,
unsigned, unsigned)

with Solaris and 

    import boost_greet
ImportError: ./boost_greet.so: undefined symbol:
_ZN5boost6python9converter19do_return_to_pythonEPKc

>c++filt _ZN5boost6python9converter19do_return_to_pythonEPKc
boost::python::converter::do_return_to_python(char const*)

What am I missing here?

Thanks

Berthold
-- 
Dipl.-Ing. Berthold Höllmann   __   Address:
hoel at germanlloyd.org        G /  \ L Germanischer Lloyd
phone: +49-40-36149-7374    -+----+- Vorsetzen 32/35    P.O.Box 111606
fax  : +49-40-36149-7320      \__/   D-20459 Hamburg    D-20416 Hamburg



This email contains confidential information for the exclusive attention
of the intended addressee. Any access of third parties to this email is
unauthorized. Any use of this email by not intended recipients like
copying, distribution, disclosure etc. is prohibited and may be
unlawful. When addressed to our clients the content of this email is
subject to the General Terms and Conditions of GL's Group of Companies
applicable at the date of this email. 

GL's Group of Companies does not warrant and/or guarantee that this
message at the moment of receipt is authentic, correct and its
communication free of errors, interruption etc. 





More information about the Cplusplus-sig mailing list