Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-02-14 10:30:15

Well, In Boost.Python V1 (the current official release) you need to have
instantiated class_builder<T> in the translation unit /before/ you call
from_python(p, type<A*>()). Have you done that? Usually unless you do
something consciously the instantiations of class_builder are all at the
bottom in your module init function.


(In Boost.Python V2 the instantiation order issue goes away ;-)).

----- Original Message -----
From: "Dominic Sacré" <bugcreator_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, February 14, 2002 9:45 AM
Subject: Re: [boost] Boost.Python: Get a pointer to my C++ class from a

> On Thursday 14 February 2002 00:56, David Abrahams wrote:
> >
> > fortunately, it /is/ simple:
> >
> > A* get_A(PyObject* p) { return from_python(p,
> boost::python::type<A*>()); }
> Hmm... I think I had already tried that, and actually it does not work.
> gcc-2.95.3 complains:
> no matching function for call to `from_python (PyObject *&,
> boost::python::type<A *>)'
> [list of about 50 candidates skipped]
> So what am I missing?
> Thanks,
> Dominic

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