$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: David LeBlanc (whisper_at_[hidden])
Date: 2002-04-11 17:25:01
I've tried to do this a few different ways, but so far no go. I downloaded
the build tool binaries (jam) and tried that, which fails utterly, probably
because I don't have (or know!) where to set it up in the file tree to run
it correctly etc. and i've also tried the Windows project files for the
python library, which I did get to work (but see below), but when I try to
build any of the examples, there are missing things in the link.
This is with:
Windows 2000 pro sp 2
VC 6.0 sp 5
Boost 1.27.0
Python 2.1
I had to make one change to bpl_static to get it to compile. Without the
change, I got the following errors:
-------------------Configuration: bpl_static - Win32
Release--------------------
Compiling...
extension_class.cpp
D:\boost\libs\python\src\extension_class.cpp(688) : error C2220: warning
treated as error - no object file generated
D:\boost\libs\python\src\extension_class.cpp(688) : warning C4660:
template-class specialization 'meta_class<class
boost::python::detail::extension_instance>' is already instantiated
D:\boost\libs\python\src\extension_class.cpp(689) : warning C4660:
template-class specialization 'class_t<class
boost::python::detail::extension_instance>' is already instantiated
Error executing cl.exe.
bpl_static.lib - 1 error(s), 2 warning(s)
This is the code that is returning the errors:
# ifndef BOOST_PYTHON_NO_TEMPLATE_EXPORT
template class BOOST_PYTHON_DECL meta_class<detail::extension_instance>;
template class BOOST_PYTHON_DECL class_t<detail::extension_instance>;
# endif
IF I add #define BOOST_PYTHON_NO_TEMPLATE_EXPORT just before these lines,
then the libarry compiles, but I don't know if it's correct.
I get the following errors while trying to compile the examples:
-------------------Configuration: example1 - Win32
Release--------------------
Linking...
Creating library Release/hello.lib and object Release/hello.exp
bpl_static.lib(extension_class.obj) : error LNK2001: unresolved external
symbol "struct _object * __cdecl boost::python::expect_non_null(struct
_object *)" (?expect_non_null_at_python@boost@@YAPAU_object@@PAU3@@Z)
bpl_static.lib(functions.obj) : error LNK2001: unresolved external symbol
"struct _object * __cdecl boost::python::expect_non_null(struct _object *)"
(?expect_non_null_at_python@boost@@YAPAU_object@@PAU3@@Z)
bpl_static.lib(objects.obj) : error LNK2001: unresolved external symbol
"struct _object * __cdecl boost::python::expect_non_null(struct _object *)"
(?expect_non_null_at_python@boost@@YAPAU_object@@PAU3@@Z)
example1.obj : error LNK2001: unresolved external symbol "struct _object *
__cdecl boost::python::expect_non_null(struct _object *)"
(?expect_non_null_at_python@boost@@YAPAU_object@@PAU3@@Z)
bpl_static.lib(init_function.obj) : error LNK2001: unresolved external
symbol "struct _object * __cdecl boost::python::expect_non_null(struct
_object *)" (?expect_non_null_at_python@boost@@YAPAU_object@@PAU3@@Z)
bpl_static.lib(classes.obj) : error LNK2001: unresolved external symbol
"struct _object * __cdecl boost::python::expect_non_null(struct _object *)"
(?expect_non_null_at_python@boost@@YAPAU_object@@PAU3@@Z)
bpl_static.lib(module_builder.obj) : error LNK2001: unresolved external
symbol "struct _object * __cdecl boost::python::expect_non_null(struct
_object *)" (?expect_non_null_at_python@boost@@YAPAU_object@@PAU3@@Z)
example1.obj : error LNK2001: unresolved external symbol "bool __cdecl
boost::python::handle_exception_impl(class boost::function0<void,struct
boost::empty_function_policy,struct boost::empty_function_mixin,int>)"
(?handle_exception_impl_at_python@boos
t@@YA_NV?$function0_at_XUempty_function_policy_at_boost@@Uempty_function_mixin_at_2@H
@2@@Z)
bpl_static.lib(types.obj) : error LNK2001: unresolved external symbol "bool
__cdecl boost::python::handle_exception_impl(class
boost::function0<void,struct boost::empty_function_policy,struct
boost::empty_function_mixin,int>)" (?handle_exception_imp
l_at_python@boost@@YA_NV?$function0_at_XUempty_function_policy_at_boost@@Uempty_funct
ion_mixin_at_2@H_at_2@@Z)
bpl_static.lib(extension_class.obj) : error LNK2001: unresolved external
symbol "bool __cdecl boost::python::handle_exception_impl(class
boost::function0<void,struct boost::empty_function_policy,struct
boost::empty_function_mixin,int>)" (?handle_exc
eption_impl_at_python@boost@@YA_NV?$function0_at_XUempty_function_policy_at_boost@@Ue
mpty_function_mixin_at_2@H_at_2@@Z)
Release/hello.dll : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
hello.dll - 11 error(s), 0 warning(s)
--------------------Configuration: getting_started1 - Win32
Release--------------------
Linking...
Creating library Release/getting_started1.lib and object
Release/getting_started1.exp
getting_started1.obj : error LNK2001: unresolved external symbol "bool
__cdecl boost::python::handle_exception_impl(class
boost::function0<void,struct boost::empty_function_policy,struct
boost::empty_function_mixin,int>)" (?handle_exception_impl_at_pyt
hon_at_boost@@YA_NV?$function0_at_XUempty_function_policy_at_boost@@Uempty_function_m
ixin_at_2@H_at_2@@Z)
bpl_static.lib(types.obj) : error LNK2001: unresolved external symbol "bool
__cdecl boost::python::handle_exception_impl(class
boost::function0<void,struct boost::empty_function_policy,struct
boost::empty_function_mixin,int>)" (?handle_exception_imp
l_at_python@boost@@YA_NV?$function0_at_XUempty_function_policy_at_boost@@Uempty_funct
ion_mixin_at_2@H_at_2@@Z)
bpl_static.lib(module_builder.obj) : error LNK2001: unresolved external
symbol "struct _object * __cdecl boost::python::expect_non_null(struct
_object *)" (?expect_non_null_at_python@boost@@YAPAU_object@@PAU3@@Z)
bpl_static.lib(functions.obj) : error LNK2001: unresolved external symbol
"struct _object * __cdecl boost::python::expect_non_null(struct _object *)"
(?expect_non_null_at_python@boost@@YAPAU_object@@PAU3@@Z)
bpl_static.lib(objects.obj) : error LNK2001: unresolved external symbol
"struct _object * __cdecl boost::python::expect_non_null(struct _object *)"
(?expect_non_null_at_python@boost@@YAPAU_object@@PAU3@@Z)
Release/getting_started1.dll : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
getting_started1.dll - 6 error(s), 0 warning(s)
Any help in getting Boost to compile and particularly the Python lib will be
greatly appreciated.
TIA,
David LeBlanc
Seattle, WA USA