Hi !!

I am really impressed with the boost libraries. I am especially interested in the Python Wrapper library (for exporting your own classes/functions)

However i have a problem linking it ...The library seems to be implemented entirely in the headers ( I think it is ) and I used the Simple example of the docs..

So i included the class_builder.hpp and imported the namespace etc.... However I get one compiler warning :

warning C4541: 'dynamic_cast' used on polymorphic type 'class boost::python::detail::instance_holder_base' with /GR-; unpredictable behavior may result

        c:\programme\microsoft visual studio\vc98\include\xstring(583) : while compiling class-template member function 'void *__thiscall boost::python::detail::extension_class<class Test,class boost::python::detail::held_instance<class Test> >::ext

ract_object_from_holder(class boost::python::detail::instance_holder_base *) const'

 

 

and about 50 unresolved externals, it seem some library or source code is missing

I am using MSVC 6.0 with Service Pack 5 and Python 2.1 final release..

Any clues on this  one ? maybe i am missing something trivial

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Here the unresolved externals:

 

error LNK2001: unresolved external symbol "void __cdecl boost::python::handle_exception(void)" (?handle_exception@python@boost@@YAXXZ)

Main.obj : error LNK2001: unresolved external symbol "public: __thiscall boost::python::module_builder::~module_builder(void)" (??1module_builder@python@boost@@QAE@XZ)

Main.obj : error LNK2001: unresolved external symbol "public: __thiscall boost::python::module_builder::module_builder(char const *)" (??0module_builder@python@boost@@QAE@PBD@Z)

Main.obj : error LNK2001: unresolved external symbol "public: void __thiscall boost::python::module_builder::add(class boost::python::reference<struct _object>,char const *)" (?add@module_builder@python@boost@@QAEXV?$reference@U_object@@@23@PBD@Z)

Main.obj : error LNK2001: unresolved external symbol "public: virtual struct _object * __thiscall boost::python::detail::type_object_base::instance_sequence_repeat(struct _object *,int)const " (?instance_sequence_repeat@type_object_base@detail@pytho

n@boost@@UBEPAU_object@@PAU5@H@Z)

Main.obj : error LNK2001: unresolved external symbol "public: virtual struct _object * __thiscall boost::python::detail::type_object_base::instance_sequence_concat(struct _object *,struct _object *)const " (?instance_sequence_concat@type_object_base

@detail@python@boost@@UBEPAU_object@@PAU5@0@Z)

Main.obj : error LNK2001: unresolved external symbol "private: virtual void __thiscall boost::python::detail::class_base::instance_dealloc(struct _object *)const " (?instance_dealloc@class_base@detail@python@boost@@EBEXPAU_object@@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: __thiscall boost::python::detail::extension_class_base::extension_class_base(char const *)" (??0extension_class_base@detail@python@boost@@QAE@PBD@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::repr(void)" (?repr@instance@python@boost@@QAEPAU_object@@XZ)

Main.obj : error LNK2001: unresolved external symbol "public: int __thiscall boost::python::instance::compare(struct _object *)" (?compare@instance@python@boost@@QAEHPAU_object@@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::str(void)" (?str@instance@python@boost@@QAEPAU_object@@XZ)

Main.obj : error LNK2001: unresolved external symbol "public: long __thiscall boost::python::instance::hash(void)" (?hash@instance@python@boost@@QAEJXZ)

Main.obj : error LNK2001: unresolved external symbol "public: int __thiscall boost::python::instance::length(void)" (?length@instance@python@boost@@QAEHXZ)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::get_subscript(struct _object *)" (?get_subscript@instance@python@boost@@QAEPAU_object@@PAU4@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: void __thiscall boost::python::instance::set_subscript(struct _object *,struct _object *)" (?set_subscript@instance@python@boost@@QAEXPAU_object@@0@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::get_slice(int,int)" (?get_slice@instance@python@boost@@QAEPAU_object@@HH@Z)

Main.obj : error LNK2001: unresolved external symbol "void __cdecl boost::python::adjust_slice_indices(struct _object *,int &,int &)" (?adjust_slice_indices@python@boost@@YAXPAU_object@@AAH1@Z)

Main.obj : error LNK2001: unresolved external symbol "public: void __thiscall boost::python::instance::set_slice(int,int,struct _object *)" (?set_slice@instance@python@boost@@QAEXHHPAU_object@@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::add(struct _object *)" (?add@instance@python@boost@@QAEPAU_object@@PAU4@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::subtract(struct _object *)" (?subtract@instance@python@boost@@QAEPAU_object@@PAU4@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::multiply(struct _object *)" (?multiply@instance@python@boost@@QAEPAU_object@@PAU4@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::divide(struct _object *)" (?divide@instance@python@boost@@QAEPAU_object@@PAU4@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::remainder(struct _object *)" (?remainder@instance@python@boost@@QAEPAU_object@@PAU4@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::divmod(struct _object *)" (?divmod@instance@python@boost@@QAEPAU_object@@PAU4@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::power(struct _object *,struct _object *)" (?power@instance@python@boost@@QAEPAU_object@@PAU4@0@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::negative(void)" (?negative@instance@python@boost@@QAEPAU_object@@XZ)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::positive(void)" (?positive@instance@python@boost@@QAEPAU_object@@XZ)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::absolute(void)" (?absolute@instance@python@boost@@QAEPAU_object@@XZ)

Main.obj : error LNK2001: unresolved external symbol "public: int __thiscall boost::python::instance::nonzero(void)" (?nonzero@instance@python@boost@@QAEHXZ)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::invert(void)" (?invert@instance@python@boost@@QAEPAU_object@@XZ)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::lshift(struct _object *)" (?lshift@instance@python@boost@@QAEPAU_object@@PAU4@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::rshift(struct _object *)" (?rshift@instance@python@boost@@QAEPAU_object@@PAU4@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::do_and(struct _object *)" (?do_and@instance@python@boost@@QAEPAU_object@@PAU4@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::do_xor(struct _object *)" (?do_xor@instance@python@boost@@QAEPAU_object@@PAU4@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::do_or(struct _object *)" (?do_or@instance@python@boost@@QAEPAU_object@@PAU4@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: int __thiscall boost::python::instance::coerce(struct _object * *,struct _object * *)" (?coerce@instance@python@boost@@QAEHPAPAU_object@@0@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::as_int(void)" (?as_int@instance@python@boost@@QAEPAU_object@@XZ)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::as_long(void)" (?as_long@instance@python@boost@@QAEPAU_object@@XZ)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::as_float(void)" (?as_float@instance@python@boost@@QAEPAU_object@@XZ)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::oct(void)" (?oct@instance@python@boost@@QAEPAU_object@@XZ)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::hex(void)" (?hex@instance@python@boost@@QAEPAU_object@@XZ)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::call(struct _object *,struct _object *)" (?call@instance@python@boost@@QAEPAU_object@@PAU4@0@Z)

Main.obj : error LNK2001: unresolved external symbol "public: struct _object * __thiscall boost::python::instance::getattr(char const *,bool)" (?getattr@instance@python@boost@@QAEPAU_object@@PBD_N@Z)

Main.obj : error LNK2001: unresolved external symbol "public: int __thiscall boost::python::instance::setattr(char const *,struct _object *)" (?setattr@instance@python@boost@@QAEHPBDPAU_object@@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: __thiscall boost::python::detail::extension_instance::~extension_instance(void)" (??1extension_instance@detail@python@boost@@QAE@XZ)

Main.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall boost::python::detail::type_object_base::~type_object_base(void)" (??1type_object_base@detail@python@boost@@UAE@XZ)

Main.obj : error LNK2001: unresolved external symbol "protected: void __thiscall boost::python::detail::extension_class_base::add_method(class boost::python::detail::function *,char const *)" (?add_method@extension_class_base@detail@python@boost@@IA

EXPAVfunction@234@PBD@Z)

Main.obj : error LNK2001: unresolved external symbol "protected: void __thiscall boost::python::detail::extension_class_base::add_constructor_object(class boost::python::detail::function *)" (?add_constructor_object@extension_class_base@detail@pytho

n@boost@@IAEXPAVfunction@234@@Z)

Main.obj : error LNK2001: unresolved external symbol "private: virtual struct _object * __thiscall boost::python::detail::init::do_call(struct _object *,struct _object *)const " (?do_call@init@detail@python@boost@@EBEPAU_object@@PAU5@0@Z)

Main.obj : error LNK2001: unresolved external symbol "public: __thiscall boost::python::detail::function::function(void)" (??0function@detail@python@boost@@QAE@XZ)

Main.obj : error LNK2001: unresolved external symbol "char const * __cdecl boost::python::from_python(struct _object *,struct boost::python::type<char const *>)" (?from_python@python@boost@@YAPBDPAU_object@@U?$type@PBD@12@@Z)

Main.obj : error LNK2001: unresolved external symbol "void __cdecl boost::python::detail::report_missing_instance_data(class boost::python::detail::extension_instance *,class boost::python::class_t<class boost::python::detail::extension_instance> *,

class type_info const &)" (?report_missing_instance_data@detail@python@boost@@YAXPAVextension_instance@123@PAV?$class_t@Vextension_instance@detail@python@boost@@@23@ABVtype_info@@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: void * __thiscall boost::python::detail::extension_class_base::try_class_conversions(class boost::python::detail::instance_holder_base *)const " (?try_class_conversions@extension_class_ba

se@detail@python@boost@@QBEPAXPAVinstance_holder_base@234@@Z)

Main.obj : error LNK2001: unresolved external symbol "class boost::python::detail::extension_instance * __cdecl boost::python::detail::get_extension_instance(struct _object *)" (?get_extension_instance@detail@python@boost@@YAPAVextension_instance@12

3@PAU_object@@@Z)