|
Boost : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-04-13 11:41:38
I have fixed Boost.Python v1 in CVS so that all tests pass with VC7.
----- Original Message -----
From: "David GD Wilson" <firestar_at_[hidden]>
> > 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
> boost.python
> > > module to use in another boost.python module, however I get the
> compile
> > > 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>'
> with
> [
> 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
> VC7...
>
> Using the make file I get this error:
> NMAKE : fatal error U1073: don't know how to make 'classes.obj'
> Stop.
>
> 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>());
> }
> #endif
>
> 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>)"
>
(?handle_exception_impl_at_python@boost@@YA_NV?$function0_at_XUempty_function_
> policy_at_boost@@Uempty_function_mixin_at_2@H_at_2@@Z) referenced in function
> "bool __cdecl boost::python::handle_exception(void (__cdecl*)(void))"
> (?handle_exception_at_python@boost@@YA_NP6AXXZ_at_Z)
>
> example1 error LNK2001: unresolved external symbol "struct _object *
> __cdecl boost::python::expect_non_null(struct _object *)"
> (?expect_non_null_at_python@boost@@YAPAU_object@@PAU3@@Z)
>
> - David
>
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk