Arrgh... and its only been 40 minutes
The relevant source:
extern Interface systems;Interface & GetInterface() {return systems;}BOOST_PYTHON_MODULE(katana){ class_<Interface>( "Interface", init<>() ) .def_readonly( "clock", &Interface::clock ) //.def_readonly( "camera", &Interface::camera ) ; class_<Clock>( "Clock", init<>() ) .def( "GetTimeSincecLastTick", &Clock::GetTimeSinceLastTick ) .def( "GetTime", &Clock::GetTime ) .def( "GetExactTime", &Clock::GetExactTime ) .def( "GetAvgFps", &Clock::GetAvgFps ) .def( "GetExactFps", &Clock::GetExactFps ) .def( "GetElapsedTimeSec", &Clock::GetElapsedTimeSec ) .def( "GetStartTime", &Clock::GetStartTime ) .def( "GetFramecount", &Clock::GetFramecount ); def( "GetInterface", GetInterface, return_value_policy<reference_existing_object>() ); //def( "GetInterface", GetInterface );}
The compiler error:
Compiling...script.cppc:\utilities\boost_1_30_0\boost\python\object\inheritance.hpp(48) : warning C4541: 'dynamic_cast' used on polymorphic type 'class Clock' with /GR-; unpredictable behavior may result c:\utilities\boost_1_30_0\boost\python\object\inheritance.hpp(46) : while compiling class-template member function 'struct std::pair<void *,struct boost::python::type_info> __cdecl boost::python::objects::polymorphic_id_generator<class Clock>::execute(void *)'c:\utilities\boost_1_30_0\boost\python\object\inheritance.hpp(48) : warning C4541: 'typeid' used on polymorphic type 'class Clock' with /GR-; unpredictable behavior may result c:\utilities\boost_1_30_0\boost\python\object\inheritance.hpp(46) : while compiling class-template member function 'struct std::pair<void *,struct boost::python::type_info> __cdecl boost::python::objects::polymorphic_id_generator<class Clock>::execute(void *)'c:\utilities\boost_1_30_0\boost\mpl\if.hpp(88) : fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit c:\utilities\boost_1_30_0\boost\mpl\if.hpp(88) : see reference to class template instantiation 'boost::mpl::if_c<0,struct boost::python::detail::specify_a_return_value_policy_to_wrap_functions_returning<void>,struct boost::python::to_python_value<void> >::answer<`template-parameter513'>' being compiled c:\utilities\boost_1_30_0\boost\python\default_call_policies.hpp(59) : see reference to class template instantiation 'boost::mpl::if_c<0,struct boost::python::detail::specify_a_return_value_policy_to_wrap_functions_returning<void>,struct boost::python::to_python_value<void> >' being compiled c:\utilities\boost_1_30_0\boost\mpl\aux_\preprocessed\msvc60\apply.hpp(41) : see reference to class template instantiation 'boost::python::default_result_converter::apply<void>' being compiled c:\utilities\boost_1_30_0\boost\mpl\aux_\preprocessed\msvc60\apply.hpp(54) : see reference to class template instantiation 'boost::mpl::aux::msvc_apply1<struct boost::python::default_result_converter>::result_<void>' being compiled c:\utilities\boost_1_30_0\boost\python\detail\caller.hpp(53) : see reference to class template instantiation 'boost::mpl::apply1<struct boost::python::default_result_converter,void>' being compiled c:\utilities\boost_1_30_0\boost\python\detail\caller.hpp(148) : see reference to class template instantiation 'boost::python::detail::select_result_converter<struct boost::python::default_call_policies,void>' being compiled c:\utilities\boost_1_30_0\boost\python\detail\caller.hpp(145) : while compiling class-template member function 'struct _object *__thiscall boost::python::detail::caller_arity<1>::impl<void (__cdecl*)(struct _object *),struct boost::python::detail::args_from_python,struct boost::python::default_call_policies,struct boost::mpl::list2<void,struct _object *> >::operator ()(struct _object *,struct _object *)'Error executing cl.exe.
Those first two warnings worry me. And about the stack limit - is this really a stack limit or is the compiler going bonkers trying to compile this? In the event that it is real, how do you specify command line options "/Zm200" in the Visual c++ 6 gui?
If I comment out the line
def( "GetInterface", GetInterface, return_value_policy() );
and uncomment the following line, the compiler heap limit goes away and a different boost error occurs (something like you can't have the function return a reference w/o special policies).
Thanks for walking me through this.
edit: a few more details
[edited by - thedustbustr on August 8, 2003 11:03:04 AM] [edited by - thedustbustr on August 8, 2003 11:04:29 AM]