Closed
Description
Thanks for the project first.
I can compile and run all other example except for 05-inheritance on VS 2015 with Boost.Python 2.7 x64, which gave me the following linking error:
1>inheritance.obj : error LNK2019: unresolved external symbol "class Base const volatile * __cdecl boost::get_pointer<class Base const volatile >(class Base const volatile *)" (??$get_pointer@$$CDVBase@@@boost@@YAPEDVBase@@PEDV1@@Z) referenced in function "public: static struct _object * __cdecl boost::python::objects::make_instance_impl<class Base,struct boost::python::objects::pointer_holder<class std::auto_ptr<class Base>,class Base>,struct boost::python::objects::make_ptr_instance<class Base,struct boost::python::objects::pointer_holder<class std::auto_ptr<class Base>,class Base> > >::execute<class std::auto_ptr<class Base> >(class std::auto_ptr<class Base> &)" (??$execute@V?$auto_ptr@VBase@@@std@@@?$make_instance_impl@VBase@@U?$pointer_holder@V?$auto_ptr@VBase@@@std@@VBase@@@objects@python@boost@@U?$make_ptr_instance@VBase@@U?$pointer_holder@V?$auto_ptr@VBase@@@std@@VBase@@@objects@python@boost@@@345@@objects@python@boost@@SAPEAU_object@@AEAV?$auto_ptr@VBase@@@std@@@Z)
Based on this discussion, I was able to fix the problem by adding the following code to inheritance.cpp. Not sure whether this should be counted as a bug of this project, but I guess it might help others if they also found this issue.
namespace boost
{
template <>
Base const volatile * get_pointer<class Base const volatile >(
class Base const volatile *c)
{
return c;
}
}
Metadata
Metadata
Assignees
Labels
No labels