[C++-sig] Boost python undef symbols

Servando Arboli servando.miguel.sm at gmail.com
Fri Jul 13 08:41:50 EDT 2018


Dear all,

I’m trying to install boost python in Windows but I must be doing something
wrong. The execution of b2 with python has produced a library, but when I’m
trying to link I get errors related to undefined symbols.



I’ve done a dumpbin /symbols with the library generated by b2, filtering
the undef symbols, I get plenty of them:



*$ grep UNDEF boost_python_symbols.txt*



37C 00000000 UNDEF  notype ()    External     | ??2 at YAPEAX_K@Z (void *
__cdecl operator new(unsigned __int64))

37D 00000000 UNDEF  notype ()    External     | ??3 at YAXPEAX@Z (void __cdecl
operator delete(void *))

37E 00000000 UNDEF  notype ()    External     | atexit

37F 00000000 UNDEF  notype ()    External     | __std_terminate

380 00000000 UNDEF  notype       External     |
__imp__invalid_parameter_noinfo_noreturn

381 00000000 UNDEF  notype       External     | __imp_memmove

382 00000000 UNDEF  notype       External     | __imp_PyObject_IsTrue

383 00000000 UNDEF  notype       External     |
__imp_PyUnicode_FromStringAndSize

384 00000000 UNDEF  notype       External     | __imp_PyLong_FromLong

385 00000000 UNDEF  notype       External     |
__imp_PyLong_FromUnsignedLong

386 00000000 UNDEF  notype       External     |
__imp_PyLong_FromUnsignedLongLong

387 00000000 UNDEF  notype       External     | __imp_PyTuple_New

388 00000000 UNDEF  notype       External     | __imp_PyErr_Occurred

389 00000000 UNDEF  notype       External     | __imp_PyObject_Size

…

…

…

124 00000000 UNDEF  notype ()    External     | ?getattr at api@python at boost
@@YA?AVobject at 123@AEBV4123 at PEBD@Z (class boost::python::api::object __cdecl
boost::python::api::getattr(class boost::python::api::object const &,char
const *))

18C 00000000 UNDEF  notype ()    External     | __CxxFrameHandler3

18D 00000000 UNDEF  notype ()    External     | __GSHandlerCheck_EH

18E 00000000 UNDEF  notype ()    External     | __security_check_cookie

465 00000000 UNDEF  notype       External     | __imp__Py_NoneStruct

466 00000000 UNDEF  notype       External     | __imp_PyDict_Type

467 00000000 UNDEF  notype       External     | ??_7type_info@@6B@ (const
type_info::`vftable')

4A5 00000000 UNDEF  notype       External     | __security_cookie

032 00000000 UNDEF  notype ()    External     | atexit

033 00000000 UNDEF  notype ()    External     | __std_terminate

034 00000000 UNDEF  notype       External     | __imp_PyObject_CallFunction

035 00000000 UNDEF  notype ()    External     |
?throw_error_already_set at python@boost@@YAXXZ (void __cdecl
boost::python::throw_error_already_set(void))

04C 00000000 UNDEF  notype ()    External     | __CxxFrameHandler3

0AC 00000000 UNDEF  notype       External     | __imp__Py_NoneStruct

0AD 00000000 UNDEF  notype       External     | __imp_PyLong_Type

0BE 00000000 UNDEF  notype ()    External     | atexit

0BF 00000000 UNDEF  notype ()    External     | __std_terminate

0C0 00000000 UNDEF  notype       External     | __imp_PyLong_AsSsize_t

0C1 00000000 UNDEF  notype       External     | __imp_PyLong_FromLongLong

0C2 00000000 UNDEF  notype       External     | __imp_PyList_New

0C3 00000000 UNDEF  notype       External     | __imp_PyList_Insert

0C4 00000000 UNDEF  notype       External     | __imp_PyList_Append

0C5 00000000 UNDEF  notype       External     | __imp_PyList_Sort

0C6 00000000 UNDEF  notype       External     | __imp_PyList_Reverse

0C7 00000000 UNDEF  notype       External     | __imp_PyErr_Occurred

0C8 00000000 UNDEF  notype       External     | __imp_PyEval_CallFunction

0C9 00000000 UNDEF  notype       External     | __imp_PyObject_Call

0CA 00000000 UNDEF  notype       External     | __imp_PyObject_CallFunction

0CC 00000000 UNDEF  notype ()    External     | ?lookup at registry
@converter at python@boost@@YAAEBUregistration at 234@Utype_info at 34@@Z (struct
boost::python::converter::registration const & __cdecl
boost::python::converter::registry::lookup(struct boost::python::type_info))

0CD 00000000 UNDEF  notype ()    External     |
?throw_error_already_set at python@boost@@YAXXZ (void __cdecl
boost::python::throw_error_already_set(void))

0E7 00000000 UNDEF  notype ()    External     | ?getattr at api@python at boost
@@YA?AVobject at 123@AEBV4123 at PEBD@Z (class boost::python::api::object __cdecl
boost::python::api::getattr(class boost::python::api::object const &,char
const *))

12E 00000000 UNDEF  notype ()    External     | __CxxFrameHandler3

38C 00000000 UNDEF  notype       External     | __imp__Py_NoneStruct

38D 00000000 UNDEF  notype       External     | __imp_PyList_Type

38E 00000000 UNDEF  notype       External     | ??_7type_info@@6B@ (const
type_info::`vftable')





When I’ve tried to compile the quickstart example with the following
command, I get the unresolved symbols errors



*C:\lib\boost_1_67_0\libs\python\example\quickstart>CL /LD /MD
/I"C:\lib\boost_1_67_0" /I"C:\ProgramData\Anaconda3\include" extending.cpp
/link /DLL /libpath:"C:\lib\boost_1_67_0\stage\lib"
/libpath:"C:\ProgramData\Anaconda3\libs"*



extending.cpp

C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\INCLUDE\xlocale(341): warning C4530: C++ exception handler used,
but unwind semantics are not enabled. Specify /EHsc

C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\INCLUDE\exception(359): warning C4577: 'noexcept' used with no
exception handling mode specified; termination on exception is not
guaranteed. Specify /EHsc

Microsoft (R) Incremental Linker Version 14.00.24210.0

Copyright (C) Microsoft Corporation.  All rights reserved.



/out:extending.dll

/dll

/implib:extending.lib

/DLL

/libpath:C:\lib\boost_1_67_0\stage\lib

/libpath:C:\ProgramData\Anaconda3\libs

extending.obj

   Creating library extending.lib and object extending.exp

extending.obj : warning LNK4217: locally defined symbol
??0instance_holder at python@boost@@QEAA at XZ (public: __cdecl
boost::python::instance_holder::instance_holder(void)) imported in function
"public: __cdecl boost::python::objects::value_holder<class `anonymous
namespace'::hello>::value_holder<class `anonymous namespace'::hello><struct
boost::python::objects::reference_to_value<class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > > >(struct _object *,struct
boost::python::objects::reference_to_value<class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > >)" (??$?0U?$reference_to_value at V?$basic_string at DU
?$char_traits at D@std@@V?$allocator at D@2@@std@@@objects at python@boost@
@@?$value_holder at Vhello@?A0xc2d1617d@@@objects at python@boost@
@QEAA at PEAU_object@@U?$reference_to_value at V?$basic_string at DU?$char_traits at D
@std@@V?$allocator at D@2@@std@@@123@@Z)

extending.obj : warning LNK4217: locally defined symbol
??1instance_holder at python@boost@@UEAA at XZ (public: virtual __cdecl
boost::python::instance_holder::~instance_holder(void)) imported in
function "public: virtual __cdecl
boost::python::objects::value_holder<class `anonymous
namespace'::hello>::~value_holder<class `anonymous
namespace'::hello>(void)" (??1?$value_holder at Vhello@?A0xc2d1617d@
@@objects at python@boost@@UEAA at XZ)

extending.obj : warning LNK4217: locally defined symbol
?install at instance_holder@python at boost@@QEAAXPEAU_object@@@Z (public: void
__cdecl boost::python::instance_holder::install(struct _object *)) imported
in function "public: static struct _object * __cdecl
boost::python::objects::make_instance_impl<class `anonymous
namespace'::hello,struct boost::python::objects::value_holder<class
`anonymous namespace'::hello>,struct
boost::python::objects::make_instance<class `anonymous
namespace'::hello,struct boost::python::objects::value_holder<class
`anonymous namespace'::hello> > >::execute<class
boost::reference_wrapper<class `anonymous namespace'::hello const > const
>(class boost::reference_wrapper<class `anonymous namespace'::hello const >
const &)" (??$execute@$$CBV?$reference_wrapper@$$CBVhello@?A0xc2d1617d@
@@boost@@@?$make_instance_impl at Vhello@?A0xc2d1617d@@U?$value_holder at Vhello
@?A0xc2d1617d@@@objects at python@boost@@U?$make_instance at Vhello@?A0xc2d1617d@
@U?$value_holder at Vhello@?A0xc2d1617d@@@objects at python@boost@@@456@
@objects at python@boost@@SAPEAU_object@@AEBV?$reference_wrapper@$$CBVhello@
?A0xc2d1617d@@@3@@Z)

extending.obj : warning LNK4217: locally defined symbol
?allocate at instance_holder@python at boost@@SAPEAXPEAU_object@@_K1 at Z (public:
static void * __cdecl boost::python::instance_holder::allocate(struct
_object *,unsigned __int64,unsigned __int64)) imported in function "public:
static void __cdecl boost::python::objects::make_holder<1>::apply<struct
boost::python::objects::value_holder<class `anonymous
namespace'::hello>,struct boost::mpl::vector1<class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > > >::execute(struct _object *,class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >)" (?execute@?$apply at U?$value_holder at Vhello
@?A0xc2d1617d@@@objects at python@boost@@U?$vector1 at V?$basic_string at DU
?$char_traits at D@std@@V?$allocator at D@2@@std@@@mpl at 4@@?$make_holder@
$00 at objects@python at boost@@SAXPEAU_object@@V?$basic_string at DU?$char_traits at D
@std@@V?$allocator at D@2@@std@@@Z)

extending.obj : warning LNK4217: locally defined symbol
?deallocate at instance_holder@python at boost@@SAXPEAU_object@@PEAX at Z (public:
static void __cdecl boost::python::instance_holder::deallocate(struct
_object *,void *)) imported in function __catch$?execute@?$apply at U
?$value_holder at Vhello@?A0xc2d1617d@@@objects at python@boost@@U?$vector1 at V
?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@@mpl at 4
@@?$make_holder@$00 at objects@python at boost@@SAXPEAU_object@@V?$basic_string at DU
?$char_traits at D@std@@V?$allocator at D@2@@std@@@Z$0

extending.obj : warning LNK4217: locally defined symbol ?lookup at registry
@converter at python@boost@@YAAEBUregistration at 234@Utype_info at 34@@Z (struct
boost::python::converter::registration const & __cdecl
boost::python::converter::registry::lookup(struct
boost::python::type_info)) imported in function "struct
boost::python::converter::registration const & __cdecl
boost::python::converter::detail::registry_lookup2<class `anonymous
namespace'::hello const >(class `anonymous namespace'::hello const &
(__cdecl*)(void))" (??$registry_lookup2@$$CBVhello@?A0xc2d1617d@
@@detail at converter@python at boost@@YAAEBUregistration at 123@P6AAEBVhello@
?A0xc2d1617d@@XZ at Z)

extending.obj : warning LNK4217: locally defined symbol ?query at registry
@converter at python@boost@@YAPEBUregistration at 234@Utype_info at 34@@Z (struct
boost::python::converter::registration const * __cdecl
boost::python::converter::registry::query(struct boost::python::type_info))
imported in function "public: static struct _typeobject const * __cdecl
boost::python::converter::expected_pytype_for_arg<class `anonymous
namespace'::hello &>::get_pytype(void)" (?get_pytype@
?$expected_pytype_for_arg at AEAVhello@?A0xc2d1617d@@@converter at python@boost@
@SAPEBU_typeobject@@XZ)

extending.obj : warning LNK4217: locally defined symbol ?insert at registry
@converter at python@boost@@YAXP6APEAU_object@@PEBX at ZUtype_info
@34 at P6APEBU_typeobject@@XZ at Z (void __cdecl
boost::python::converter::registry::insert(struct _object * (__cdecl*)(void
const *),struct boost::python::type_info,struct _typeobject const *
(__cdecl*)(void))) imported in function "public: __cdecl
boost::python::to_python_converter<class `anonymous
namespace'::hello,struct boost::python::objects::class_cref_wrapper<class
`anonymous namespace'::hello,struct
boost::python::objects::make_instance<class `anonymous
namespace'::hello,struct boost::python::objects::value_holder<class
`anonymous namespace'::hello> > >,1>::to_python_converter<class `anonymous
namespace'::hello,struct boost::python::objects::class_cref_wrapper<class
`anonymous namespace'::hello,struct
boost::python::objects::make_instance<class `anonymous
namespace'::hello,struct boost::python::objects::value_holder<class
`anonymous namespace'::hello> > >,1>(void)" (??0?$to_python_converter at Vhello
@?A0xc2d1617d@@U?$class_cref_wrapper at Vhello@?A0xc2d1617d@
@U?$make_instance at Vhello@?A0xc2d1617d@@U?$value_holder at Vhello@?A0xc2d1617d@
@@objects at python@boost@@@objects at python@boost@@@objects at python@boost@
@$00 at python@boost@@QEAA at XZ)

extending.obj : warning LNK4217: locally defined symbol ?insert at registry
@converter at python@boost@@YAXP6APEAXPEAU_object@
@@ZP6AX0PEAUrvalue_from_python_stage1_data at 234@@ZUtype_info at 34
@P6APEBU_typeobject@@XZ at Z (void __cdecl
boost::python::converter::registry::insert(void * (__cdecl*)(struct _object
*),void (__cdecl*)(struct _object *,struct
boost::python::converter::rvalue_from_python_stage1_data *),struct
boost::python::type_info,struct _typeobject const * (__cdecl*)(void)))
imported in function "public: __cdecl
boost::python::converter::shared_ptr_from_python<class `anonymous
namespace'::hello,class boost::shared_ptr>::shared_ptr_from_python<class
`anonymous namespace'::hello,class boost::shared_ptr>(void)"
(??0?$shared_ptr_from_python at Vhello@?A0xc2d1617d@@Vshared_ptr at boost
@@@converter at python@boost@@QEAA at XZ)

extending.obj : warning LNK4217: locally defined symbol
?get_class_object at registration@converter at python@boost@@QEBAPEAU_typeobject@@XZ
(public: struct _typeobject * __cdecl
boost::python::converter::registration::get_class_object(void)const )
imported in function "public: static struct _typeobject * __cdecl
boost::python::objects::make_instance<class `anonymous
namespace'::hello,struct boost::python::objects::value_holder<class
`anonymous namespace'::hello> >::get_class_object<class
boost::reference_wrapper<class `anonymous namespace'::hello const > const
>(class boost::reference_wrapper<class `anonymous namespace'::hello const >
const &)" (??$get_class_object@$$CBV?$reference_wrapper@$$CBVhello@
?A0xc2d1617d@@@boost@@@?$make_instance at Vhello@?A0xc2d1617d@
@U?$value_holder at Vhello@?A0xc2d1617d@@@objects at python@boost@@@objects at python
@boost@@SAPEAU_typeobject@@AEBV?$reference_wrapper@$$CBVhello@?A0xc2d1617d@
@@3@@Z)

extending.obj : warning LNK4217: locally defined symbol
?expected_from_python_type at registration@converter at python@boost@
@QEBAPEBU_typeobject@@XZ (public: struct _typeobject const * __cdecl
boost::python::converter::registration::expected_from_python_type(void)const
) imported in function "public: static struct _typeobject const * __cdecl
boost::python::converter::expected_from_python_type_direct<class `anonymous
namespace'::hello>::get_pytype(void)" (?get_pytype@
?$expected_from_python_type_direct at Vhello@?A0xc2d1617d@@@converter at python
@boost@@SAPEBU_typeobject@@XZ)

extending.obj : warning LNK4217: locally defined symbol
?throw_error_already_set at python@boost@@YAXXZ (void __cdecl
boost::python::throw_error_already_set(void)) imported in function "struct
_object * __cdecl boost::python::expect_non_null<struct _object>(struct
_object *)" (??$expect_non_null at U_object@@@python at boost@@YAPEAU_object@
@PEAU2@@Z)

extending.obj : warning LNK4217: locally defined symbol
??0shared_ptr_deleter at converter@python at boost@@QEAA at V?$handle at U_object@@@23@@Z
(public: __cdecl
boost::python::converter::shared_ptr_deleter::shared_ptr_deleter(class
boost::python::handle<struct _object>)) imported in function "private:
static void __cdecl boost::python::converter::shared_ptr_from_python<class
`anonymous namespace'::hello,class boost::shared_ptr>::construct(struct
_object *,struct boost::python::converter::rvalue_from_python_stage1_data
*)" (?construct@?$shared_ptr_from_python at Vhello@?A0xc2d1617d@
@Vshared_ptr at boost@@@converter at python@boost@@CAXPEAU_object@
@PEAUrvalue_from_python_stage1_data at 234@@Z)

extending.obj : warning LNK4217: locally defined symbol
??1shared_ptr_deleter at converter@python at boost@@QEAA at XZ (public: __cdecl
boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter(void))
imported in function "public: __cdecl
boost::detail::shared_count::shared_count<void *,struct
boost::python::converter::shared_ptr_deleter>(void *,struct
boost::python::converter::shared_ptr_deleter)"
(??$?0PEAXUshared_ptr_deleter at converter@python at boost@@@shared_count at detail
@boost@@QEAA at PEAXUshared_ptr_deleter@converter at python@2@@Z)

extending.obj : warning LNK4217: locally defined symbol
??Rshared_ptr_deleter at converter@python at boost@@QEAAXPEBX at Z (public: void
__cdecl boost::python::converter::shared_ptr_deleter::operator()(void const
*)) imported in function "public: __cdecl
boost::detail::shared_count::shared_count<void *,struct
boost::python::converter::shared_ptr_deleter>(void *,struct
boost::python::converter::shared_ptr_deleter)"
(??$?0PEAXUshared_ptr_deleter at converter@python at boost@@@shared_count at detail
@boost@@QEAA at PEAXUshared_ptr_deleter@converter at python@2@@Z)

extending.obj : warning LNK4217: locally defined symbol
?get_lvalue_from_python at converter@python at boost@@YAPEAXPEAU_object@
@AEBUregistration at 123@@Z (void * __cdecl
boost::python::converter::get_lvalue_from_python(struct _object *,struct
boost::python::converter::registration const &)) imported in function
"public: __cdecl boost::python::converter::reference_arg_from_python<class
`anonymous namespace'::hello &>::reference_arg_from_python<class `anonymous
namespace'::hello &>(struct _object *)"
(??0?$reference_arg_from_python at AEAVhello@?A0xc2d1617d@@@converter at python
@boost@@QEAA at PEAU_object@@@Z)

extending.obj : warning LNK4217: locally defined symbol
?rvalue_from_python_stage1 at converter@python at boost
@@YA?AUrvalue_from_python_stage1_data at 123@PEAU_object@@AEBUregistration at 123@@Z
(struct boost::python::converter::rvalue_from_python_stage1_data __cdecl
boost::python::converter::rvalue_from_python_stage1(struct _object *,struct
boost::python::converter::registration const &)) imported in function
"public: __cdecl boost::python::converter::arg_rvalue_from_python<class
`anonymous namespace'::hello const &>::arg_rvalue_from_python<class
`anonymous namespace'::hello const &>(struct _object *)"
(??0?$arg_rvalue_from_python at AEBVhello@?A0xc2d1617d@@@converter at python
@boost@@QEAA at PEAU_object@@@Z)

extending.obj : warning LNK4217: locally defined symbol
??1py_function_impl_base at objects@python at boost@@UEAA at XZ (public: virtual
__cdecl
boost::python::objects::py_function_impl_base::~py_function_impl_base(void))
imported in function "public: virtual __cdecl
boost::python::objects::caller_py_function_impl<struct
boost::python::detail::caller<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > (__cdecl*)(class
`anonymous namespace'::hello const &),struct
boost::python::default_call_policies,struct boost::mpl::vector2<class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >,class `anonymous namespace'::hello const &> >
>::~caller_py_function_impl<struct boost::python::detail::caller<class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > (__cdecl*)(class `anonymous namespace'::hello const
&),struct boost::python::default_call_policies,struct
boost::mpl::vector2<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class `anonymous
namespace'::hello const &> > >(void)" (??1?$caller_py_function_impl at U
?$caller at P6A?AV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@
@AEBVhello@?A0xc2d1617d@@@ZUdefault_call_policies at python@boost@@U?$vector2 at V
?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@AEBVhello@
?A0xc2d1617d@@@mpl at 7@@detail at python@boost@@@objects at python@boost@@UEAA at XZ)

extending.obj : warning LNK4217: locally defined symbol
??0py_function_impl_base at objects@python at boost@@QEAA at XZ (public: __cdecl
boost::python::objects::py_function_impl_base::py_function_impl_base(void))
imported in function "public: __cdecl
boost::python::objects::caller_py_function_impl<struct
boost::python::detail::caller<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > (__cdecl*)(class
`anonymous namespace'::hello const &),struct
boost::python::default_call_policies,struct boost::mpl::vector2<class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >,class `anonymous namespace'::hello const &> >
>::caller_py_function_impl<struct boost::python::detail::caller<class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > (__cdecl*)(class `anonymous namespace'::hello const
&),struct boost::python::default_call_policies,struct
boost::mpl::vector2<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class `anonymous
namespace'::hello const &> > >(struct boost::python::detail::caller<class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > (__cdecl*)(class `anonymous namespace'::hello const
&),struct boost::python::default_call_policies,struct
boost::mpl::vector2<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class `anonymous
namespace'::hello const &> > const &)" (??0?$caller_py_function_impl at U
?$caller at P6A?AV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@
@AEBVhello@?A0xc2d1617d@@@ZUdefault_call_policies at python@boost@@U?$vector2 at V
?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@AEBVhello@
?A0xc2d1617d@@@mpl at 7@@detail at python@boost@@@objects at python@boost@@QEAA at AEBU
?$caller at P6A?AV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@
@AEBVhello@?A0xc2d1617d@@@ZUdefault_call_policies at python@boost@@U?$vector2 at V
?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@AEBVhello@
?A0xc2d1617d@@@mpl at 7@@detail at 23@@Z)

extending.obj : warning LNK4217: locally defined symbol
?add_to_namespace at objects@python at boost@@YAXAEBVobject at api@23 at PEBD01@Z (void
__cdecl boost::python::objects::add_to_namespace(class
boost::python::api::object const &,char const *,class
boost::python::api::object const &,char const *)) imported in function
"private: void __cdecl boost::python::class_<class `anonymous
namespace'::hello,struct boost::python::detail::not_specified,struct
boost::python::detail::not_specified,struct
boost::python::detail::not_specified>::def_impl<class `anonymous
namespace'::hello,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > (__cdecl*)(class
A0xc2d1617d::hello const &),struct boost::python::detail::def_helper<char
const *,struct boost::python::detail::not_specified,struct
boost::python::detail::not_specified,struct
boost::python::detail::not_specified> >(class `anonymous namespace'::hello
*,char const *,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > (__cdecl*)(class
A0xc2d1617d::hello const &),struct boost::python::detail::def_helper<char
const *,struct boost::python::detail::not_specified,struct
boost::python::detail::not_specified,struct
boost::python::detail::not_specified> const &,...)" (??$def_impl at Vhello
@?A0xc2d1617d@@P6A?AV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@
@std@@AEBV12@@ZU?$def_helper at PEBDUnot_specified@detail at python@boost@
@U1234 at U1234@@detail at python@boost@@@?$class_ at Vhello@?A0xc2d1617d@
@Unot_specified at detail@python at boost@@U3456 at U3456@@python at boost
@@AEAAXPEAVhello@?A0xc2d1617d@@PEBDP6A?AV?$basic_string at DU?$char_traits at D
@std@@V?$allocator at D@2@@std@@AEBV34@@ZAEBU?$def_helper at PEBDUnot_specified
@detail at python@boost@@U1234 at U1234@@detail at 12@ZZ)

extending.obj : warning LNK4217: locally defined symbol
??0class_base at objects@python at boost@@QEAA at PEBD_KQEBUtype_info@23 at 0@Z
(public: __cdecl boost::python::objects::class_base::class_base(char const
*,unsigned __int64,struct boost::python::type_info const * const,char const
*)) imported in function "public: __cdecl boost::python::class_<class
`anonymous namespace'::hello,struct
boost::python::detail::not_specified,struct
boost::python::detail::not_specified,struct
boost::python::detail::not_specified>::class_<class `anonymous
namespace'::hello,struct boost::python::detail::not_specified,struct
boost::python::detail::not_specified,struct
boost::python::detail::not_specified><class boost::python::init<class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >,struct boost::mpl::void_,struct
boost::mpl::void_,struct boost::mpl::void_,struct boost::mpl::void_,struct
boost::mpl::void_,struct boost::mpl::void_,struct boost::mpl::void_,struct
boost::mpl::void_,struct boost::mpl::void_,struct boost::mpl::void_,struct
boost::mpl::void_,struct boost::mpl::void_,struct boost::mpl::void_,struct
boost::mpl::void_> >(char const *,struct boost::python::init_base<class
boost::python::init<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,struct
boost::mpl::void_,struct boost::mpl::void_,struct boost::mpl::void_,struct
boost::mpl::void_,struct boost::mpl::void_,struct boost::mpl::void_,struct
boost::mpl::void_,struct boost::mpl::void_,struct boost::mpl::void_,struct
boost::mpl::void_,struct boost::mpl::void_,struct boost::mpl::void_,struct
boost::mpl::void_,struct boost::mpl::void_> > const &)" (??$?0V?$init at V
?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@Uvoid_ at mpl
@boost@@U345 at U345@U345 at U345@U345 at U345@U345 at U345@U345 at U345@U345 at U345@U345@
@python at boost@@@?$class_ at Vhello@?A0xc2d1617d@@Unot_specified at detail
@python at boost@@U3456 at U3456@@python at boost@@QEAA at PEBDAEBU?$init_base at V?$init at V
?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@Uvoid_ at mpl
@boost@@U345 at U345@U345 at U345@U345 at U345@U345 at U345@U345 at U345@U345 at U345@U345@
@python at boost@@@12@@Z)

extending.obj : warning LNK4217: locally defined symbol
?set_instance_size at class_base@objects at python@boost@@IEAAX_K at Z (protected:
void __cdecl boost::python::objects::class_base::set_instance_size(unsigned
__int64)) imported in function "private: void __cdecl
boost::python::class_<class `anonymous namespace'::hello,struct
boost::python::detail::not_specified,struct
boost::python::detail::not_specified,struct
boost::python::detail::not_specified>::initialize<struct
boost::python::init_base<class boost::python::init<class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >,struct boost::mpl::void_,struct
boost::mpl::void_,struct boost::mpl::void_,struct boost::mpl::void_,struct
boost::mpl::void_,struct boost::mpl::void_,struct boost::mpl::void_,struct
boost::mpl::void_,struct boost::mpl::void_,struct boost::mpl::void_,struct
boost::mpl::void_,struct boost::mpl::void_,struct boost::mpl::void_,struct
boost::mpl::void_> > >(struct boost::python::init_base<class
boost::python::init<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,struct
boost::mpl::void_,struct boost::mpl::void_,struct boost::mpl::void_,struct
boost::mpl::void_,struct boost::mpl::void_,struct boost::mpl::void_,struct
boost::mpl::void_,struct boost::mpl::void_,struct boost::mpl::void_,struct
boost::mpl::void_,struct boost::mpl::void_,struct boost::mpl::void_,struct
boost::mpl::void_,struct boost::mpl::void_> > const &)" (??$initialize at U
?$init_base at V?$init at V?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@
@std@@Uvoid_ at mpl@boost@@U345 at U345@U345 at U345@U345 at U345@U345 at U345@U345 at U345
@U345 at U345@U345@@python at boost@@@python at boost@@@?$class_ at Vhello@?A0xc2d1617d@
@Unot_specified at detail@python at boost@@U3456 at U3456@@python at boost
@@AEAAXAEBU?$init_base at V?$init at V?$basic_string at DU?$char_traits at D@std@
@V?$allocator at D@2@@std@@Uvoid_ at mpl@boost@@U345 at U345@U345 at U345@U345 at U345
@U345 at U345@U345 at U345@U345 at U345@U345@@python at boost@@@12@@Z)

extending.obj : warning LNK4217: locally defined symbol
?function_object at objects@python at boost@@YA?AVobject at api@23 at AEBUpy_function
@123 at AEBU?$pair at PEBUkeyword@detail at python@boost@@PEBU1234@@std@@@Z (class
boost::python::api::object __cdecl
boost::python::objects::function_object(struct
boost::python::objects::py_function const &,struct std::pair<struct
boost::python::detail::keyword const *,struct
boost::python::detail::keyword const *> const &)) imported in function
"class boost::python::api::object __cdecl
boost::python::detail::make_function_aux<class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > (__cdecl*)(class `anonymous namespace'::hello const
&),struct boost::python::default_call_policies,struct
boost::mpl::vector2<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class `anonymous
namespace'::hello const &>,struct boost::mpl::int_<0> >(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > (__cdecl*)(class `anonymous namespace'::hello const
&),struct boost::python::default_call_policies const &,struct
boost::mpl::vector2<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class `anonymous
namespace'::hello const &> const &,struct std::pair<struct
boost::python::detail::keyword const *,struct
boost::python::detail::keyword const *> const &,struct
boost::mpl::int_<0>)" (??$make_function_aux at P6A?AV?$basic_string at DU
?$char_traits at D@std@@V?$allocator at D@2@@std@@AEBVhello@?A0xc2d1617d@
@@ZUdefault_call_policies at python@boost@@U?$vector2 at V?$basic_string at DU
?$char_traits at D@std@@V?$allocator at D@2@@std@@AEBVhello@?A0xc2d1617d@@@mpl at 7
@U?$int_@$0A@@97@@detail at python@boost@@YA?AVobject at api@12 at P6A
?AV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@AEBVhello@
?A0xc2d1617d@@@ZAEBUdefault_call_policies at 12@AEBU?$vector2 at V
?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@AEBVhello@
?A0xc2d1617d@@@mpl at 2@AEBU?$pair at PEBUkeyword@detail at python@boost@@PEBU1234@
@6 at U?$int_@$0A@@mpl at 2@@Z)

extending.obj : warning LNK4217: locally defined symbol
?function_object at objects@python at boost@@YA?AVobject at api@23 at AEBUpy_function
@123@@Z (class boost::python::api::object __cdecl
boost::python::objects::function_object(struct
boost::python::objects::py_function const &)) imported in function "class
boost::python::api::object __cdecl
boost::python::detail::make_function_aux<class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > (__cdecl*)(class `anonymous namespace'::hello const
&),struct boost::python::default_call_policies,struct
boost::mpl::vector2<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class `anonymous
namespace'::hello const &> >(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > (__cdecl*)(class
`anonymous namespace'::hello const &),struct
boost::python::default_call_policies const &,struct
boost::mpl::vector2<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class `anonymous
namespace'::hello const &> const &)" (??$make_function_aux at P6A
?AV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@AEBVhello@
?A0xc2d1617d@@@ZUdefault_call_policies at python@boost@@U?$vector2 at V
?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@AEBVhello@
?A0xc2d1617d@@@mpl at 7@@detail at python@boost@@YA?AVobject at api@12 at P6A
?AV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@AEBVhello@
?A0xc2d1617d@@@ZAEBUdefault_call_policies at 12@AEBU?$vector2 at V
?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@AEBVhello@
?A0xc2d1617d@@@mpl at 2@@Z)

extending.obj : warning LNK4217: locally defined symbol
?copy_class_object at objects@python at boost@@YAXAEBUtype_info at 23@0 at Z (void
__cdecl boost::python::objects::copy_class_object(struct
boost::python::type_info const &,struct boost::python::type_info const &))
imported in function "private: static void __cdecl
boost::python::objects::class_metadata<class `anonymous
namespace'::hello,struct boost::python::detail::not_specified,struct
boost::python::detail::not_specified,struct
boost::python::detail::not_specified>::maybe_register_class_to_python<class
`anonymous namespace'::hello>(class `anonymous namespace'::hello *,struct
boost::mpl::bool_<0>)" (??$maybe_register_class_to_python at Vhello
@?A0xc2d1617d@@@?$class_metadata at Vhello@?A0xc2d1617d@@Unot_specified at detail
@python at boost@@U3456 at U3456@@objects at python@boost@@CAXPEAVhello@?A0xc2d1617d@
@U?$bool_@$0A@@mpl at 3@@Z)

extending.obj : warning LNK4217: locally defined symbol ?init_module at detail
@python at boost@@YAPEAU_object@@AEAUPyModuleDef@@P6AXXZ at Z (struct _object *
__cdecl boost::python::detail::init_module(struct PyModuleDef &,void
(__cdecl*)(void))) imported in function PyInit_extending

extending.obj : warning LNK4217: locally defined symbol
?scope_setattr_doc at detail@python at boost@@YAXPEBDAEBVobject at api@23 at 0@Z (void
__cdecl boost::python::detail::scope_setattr_doc(char const *,class
boost::python::api::object const &,char const *)) imported in function
"void __cdecl boost::python::def<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > (__cdecl*)(class
`anonymous namespace'::hello const &)>(char const *,class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > (__cdecl*)(class `anonymous namespace'::hello const
&))" (??$def at P6A?AV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@
@std@@AEBVhello@?A0xc2d1617d@@@Z at python@boost@
@YAXPEBDP6A?AV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@
@AEBVhello@?A0xc2d1617d@@@Z at Z)

extending.obj : *error LNK2019:* unresolved external symbol
"__declspec(dllimport) void * __cdecl
boost::python::objects::find_static_type(void *,struct
boost::python::type_info,struct boost::python::type_info)"
(__imp_?find_static_type at objects@python at boost@@YAPEAXPEAXUtype_info at 23@1 at Z)
referenced in function "private: virtual void * __cdecl
boost::python::objects::value_holder<class `anonymous
namespace'::hello>::holds(struct boost::python::type_info,bool)" (?holds@
?$value_holder at Vhello@?A0xc2d1617d@@@objects at python@boost@
@EEAAPEAXUtype_info at 34@_N at Z)

extending.obj : *error LNK2019:* unresolved external symbol "void __cdecl
boost::throw_exception(class std::exception const &)"
(?throw_exception at boost@@YAXAEBVexception at std@@@Z) referenced in function
"public: __cdecl boost::detail::shared_count::shared_count<void *,struct
boost::python::converter::shared_ptr_deleter>(void *,struct
boost::python::converter::shared_ptr_deleter)"
(??$?0PEAXUshared_ptr_deleter at converter@python at boost@@@shared_count at detail
@boost@@QEAA at PEAXUshared_ptr_deleter@converter at python@2@@Z)

extending.obj : *error LNK2019:* unresolved external symbol
"__declspec(dllimport) public: __cdecl
boost::python::converter::shared_ptr_deleter::shared_ptr_deleter(struct
boost::python::converter::shared_ptr_deleter const &)"
(__imp_??0shared_ptr_deleter at converter@python at boost@@QEAA at AEBU0123@@Z)
referenced in function "public: __cdecl std::_Compressed_pair<struct
boost::python::converter::shared_ptr_deleter,void
*,0>::_Compressed_pair<struct
boost::python::converter::shared_ptr_deleter,void *,0><struct
boost::python::converter::shared_ptr_deleter &,void * &>(struct
std::_One_then_variadic_args_t,struct
boost::python::converter::shared_ptr_deleter &,void * &)"
(??$?0AEAUshared_ptr_deleter at converter@python at boost@@AEAPEAX@
?$_Compressed_pair at Ushared_ptr_deleter@converter at python@boost@@PEAX$0A@@std@
@QEAA at U_One_then_variadic_args_t@1 at AEAUshared_ptr_deleter@converter at python
@boost@@AEAPEAX at Z)

extending.obj : *error LNK2019:* unresolved external symbol
"__declspec(dllimport) public: __cdecl
boost::python::objects::class_base::~class_base(void)"
(__imp_??1class_base at objects@python at boost@@QEAA at XZ) referenced in function
"public: __cdecl boost::python::class_<class `anonymous
namespace'::hello,struct boost::python::detail::not_specified,struct
boost::python::detail::not_specified,struct
boost::python::detail::not_specified>::~class_<class `anonymous
namespace'::hello,struct boost::python::detail::not_specified,struct
boost::python::detail::not_specified,struct
boost::python::detail::not_specified>(void)" (??1?$class_ at Vhello
@?A0xc2d1617d@@Unot_specified at detail@python at boost@@U3456 at U3456@@python at boost
@@QEAA at XZ)

extending.obj : *error LNK2019:* unresolved external symbol
"__declspec(dllimport) void __cdecl
boost::python::objects::register_dynamic_id_aux(struct
boost::python::type_info,struct std::pair<void *,struct
boost::python::type_info> (__cdecl*)(void *))"
(__imp_?register_dynamic_id_aux at objects@python at boost@@YAXUtype_info at 23
@P6A?AU?$pair at PEAXUtype_info@python at boost@@@std@@PEAX at Z@Z) referenced in
function "void __cdecl boost::python::objects::register_dynamic_id<class
`anonymous namespace'::hello>(class `anonymous namespace'::hello *)"
(??$register_dynamic_id at Vhello@?A0xc2d1617d@@@objects at python@boost@
@YAXPEAVhello@?A0xc2d1617d@@@Z)

extending.dll : fatal error LNK1120: 5 unresolved externals







Finally, this is the output that I get when I follow the example of the
documentation:



*C:\lib\boost_1_67_0\libs\python\example\quickstart>bjam toolset=msvc
--verbose-test -a test*



warning: no Python configured in user-config.jam

warning: will use default configuration

...found 34 targets...

...updating 12 targets...

msvc.write-setup-script ..\bin\standalone\msvc\msvc-14.0\msvc-setup.bat

compile-c-c++ extending.obj



    call "..\bin\standalone\msvc\msvc-14.0\msvc-setup.bat" x86 >nul

cl /Zm800 -nologo @"extending.obj.rsp"



...failed compile-c-c++ extending.obj...

...skipped <p.>extending.pyd for lack of <p.>extending.obj...

...skipped <p.>test_ext for lack of <p.>extending.pyd...

compile-c-c++ embedding.obj



    call "..\bin\standalone\msvc\msvc-14.0\msvc-setup.bat" x86 >nul

cl /Zm800 -nologo @"embedding.obj.rsp"



...failed compile-c-c++ embedding.obj...

...skipped <p.>test_embed.exe for lack of <p.>embedding.obj...

...skipped <p.>test_embed.run for lack of <p.>test_embed.exe...

...failed updating 2 targets...

...skipped 6 targets...

...updated 2 targets...



I would appreciate if somebody can give some clues on how to solve this
issue.



Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20180713/ee0b2d07/attachment-0001.html>


More information about the Cplusplus-sig mailing list