Boost logo

Boost :

From: David GD Wilson (firestar_at_[hidden])
Date: 2002-04-13 08:59:56

> Ralf W. Grosse-Kunstleve wrote:
> --- David GD Wilson <firestar_at_[hidden]> wrote:
> > Hi,
> >
> > I am trying to export a C++ class (CVector) defined in a
> > module to use in another boost.python module, however I get the
> > error:
> >
> > c:\sdk\boost_1_27_0\boost\python\cross_module.hpp(215): error C2665:
> > 'boost::python::from_python' : none of the 59 overloads can convert
> > parameter 2 from type 'boost::python::type<T>'
> > with
> > [
> > T=boost::shared_ptr<CVector> &
> > ]
> The cross-module support definitely works with VC6, but I have not
> tried VC7.
> Questions:
> - Can you compile all the examples? You can quickly try this using
> vc60.mak in the build directory.

Building the dvect example (by creating a project with just dvect.cpp in
it), I get the same type of error:

c:\sdk\boost_1_27_0\boost\python\cross_module.hpp(215): error C2665:
'boost::python::from_python' : none of the 72 overloads can convert
parameter 2 from type 'boost::python::type<T>'
            T=boost::shared_ptr<vects::dvect> &

And something very similar for ivect.

> - Does your code compile if you remove the export_converters()
> statement?

Yes it does.

> - If yes, create a dummy function with a boost::shared_ptr<CVector> &
> argument and core_module.def(dummy, "dummy"). Does this compile
> (try with gcc first)?

This does not compile either.

Note that other boost::python things appear to not work properly in

Using the make file I get this error:
NMAKE : fatal error U1073: don't know how to make 'classes.obj'

Building the test project in the IDE, I get:

c:\sdk\boost_1_27_0\boost\python\conversions.hpp(268): error C2065:
'smart_ptr_from_python' : undeclared identifier

Which is being called from this part of conversions.hpp:

#if !defined(BOOST_MSVC6_OR_EARLIER)
template <class T>
boost::shared_ptr<T> from_python(PyObject*p,
boost::python::type<boost::shared_ptr<T> >)
    return smart_ptr_from_python(p,
boost::python::type<boost::shared_ptr<T> >(), boost::python::type<T>());

and here BOOST_MSVC6_OR_EARLIER is not defined.

Building the example1 project, I get link errors:

example1 error LNK2019: unresolved external symbol "bool __cdecl
boost::python::handle_exception_impl(class boost::function0<void,struct
boost::empty_function_policy,struct boost::empty_function_mixin,int>)"
policy_at_boost@@Uempty_function_mixin_at_2@H_at_2@@Z) referenced in function
"bool __cdecl boost::python::handle_exception(void (__cdecl*)(void))"

example1 error LNK2001: unresolved external symbol "struct _object *
__cdecl boost::python::expect_non_null(struct _object *)"

- David

Boost list run by bdawes at, gregod at, cpdaniel at, john at