Base base;
BaseWrap& baseWrap(reinte rpret_cast<Base Wrap&>(base));
boost::python:: object obj(boost::shar ed_ptr<BaseWrap >(&baseWrap)) ; //
Compile error
Results in this error:
1>PythonPassRef erence.obj : error LNK2019: unresolved external symbol
"class boost::python:: api::object __cdecl obj(class
boost::shared_p tr<struct BaseWrap&)" (?obj@@YA?
AVobject@api@py thon@boost@@AAV ?$shared_ptr@UB aseWrap@@@4@@Z)
referenced in function _main
My first thought is somehow that looks like a function declaration
instead of creating an object on the stack and instantiating it. If I
remove the shared_ptr, the error goes away.
In case it helps, here's a few more details.
boost::python:: object has the following constructor:
// explicit conversion from any C++ object to Python
template <class T>
explicit object(
T const& x
# if BOOST_WORKAROUN D(BOOST_MSVC, < 1300)
// use some SFINAE to un-confuse MSVC about its
// copy-initialization ambiguity claim.
, typename mpl::if_<is_pro xy<T>,int&,int> ::type* = 0
# endif
)
: object_base(obj ect_base_initia lizer(x))
{
}
boost::shared_p tr<Thas the following constructor:
template<class Y>
explicit shared_ptr( Y * p ): px( p ), pn( p ) // Y must be
complete
{
boost::detail:: sp_enable_share d_from_this( pn, p, p );
}
Any tips on how to solve this would be greatly appreciated. I'm
probably overlooking something obvious.
Thanks in advance,
Lawrence