Boost logo

Boost Users :

Subject: Re: [Boost-users] [python] python 3 with boost 1.44, without using bjam
From: Geoff Hilton (geoff.hilton_at_[hidden])
Date: 2010-09-09 16:03:17


On 09/09/2010 12:06 AM, dhruva wrote:
> Hello,
>
> On Thu, Sep 9, 2010 at 12:32 AM, Geoff Hilton
> <geoff.hilton_at_[hidden]> wrote:
>> but for now I've reverted to regular msvc projects, I was able to compile
>> boost.python initially with bjam when I updated to Boost 1.44, the result
>> generated the following files of relevance:
>> libboost_python3-vc90-mt-1_44.lib
>> libboost_python3-vc90-mt.lib
>> libboost_python3-vc90-mt-sgd-1_44.lib
>> libboost_python3-vc90-mt-sgd.lib
>>
>> which is great.. but when I try to compile my project it looks for
>> libboost_python-vc90-mt-1_44.lib or libboost_python-vc90-mt-gd-1_44.lib as
>> appropriate. How can I make msvc compile it successfully? I know bjam is a
>> compiler driver, so I imagine there's a way...
>
> I had a similar issue and hence decided to disable to auto linking
> feature in boost on Windows. It use the "#pragma" to tell the linker
> to link with the appropriate library when you include headers that
> require libraries. If it is not too much of an inconvenience, you
> might want to take this route.
>
> To do so:
> Just define BOOST_ALL_NO_LIB at workspace/solution level and add the
> required libraries in the respective project settings.
>
> -dhruva

Thanks for your response,
The macro is now defined and project settings point to
C:\Python31\libs\Python31.lib and
$(ProgramFiles)\boost\boost_1_44_0\lib\libboost_python3-vc90-mt-1_44.lib
and I get the result pasted below. Is this because the function I'm
trying to expose looks like this?

bool X(unsigned int, unsigned int, const double* const, const double*
const, const double* const, const unsigned int* const, double* const *
const);

I realized afterwards that I may need to rewrite/overload the function
to accept PyObject pointers, but aside from that, should it be compiling
anyway? What else could I be missing?

Thanks again,
Geoff

ComputeEntropy.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: virtual unsigned int __thiscall
boost::python::objects::py_function_impl_base::max_arity(void)const "
(__imp_?max_arity_at_py_function_impl_base_at_objects@python_at_boost@@UBEIXZ)
ComputeEntropy.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: virtual __thiscall
boost::python::objects::py_function_impl_base::~py_function_impl_base(void)"
(__imp_??1py_function_impl_base_at_objects@python_at_boost@@UAE_at_XZ)
ComputeEntropy.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) class boost::python::api::object __cdecl
boost::python::objects::function_object(struct
boost::python::objects::py_function const &)"
(__imp_?function_object_at_objects@python_at_boost@@YA?AVobject_at_api@23_at_ABUpy_function_at_123@@Z)
ComputeEntropy.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) struct _object * __cdecl
boost::python::detail::init_module(char const *,void (__cdecl*)(void))"
(__imp_?init_module_at_detail@python_at_boost@@YAPAU_object@@PBDP6AXXZ_at_Z)
ComputeEntropy.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) void __cdecl
boost::python::detail::scope_setattr_doc(char const *,class
boost::python::api::object const &,char const *)"
(__imp_?scope_setattr_doc_at_detail@python_at_boost@@YAXPBDABVobject_at_api@23_at_0@Z)
ComputeEntropy.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) struct boost::python::converter::registration
const & __cdecl boost::python::converter::registry::lookup(struct
boost::python::type_info)"
(__imp_?lookup_at_registry@converter_at_python@boost@@YAABUregistration_at_234@Utype_info_at_34@@Z)
ComputeEntropy.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) struct boost::python::converter::registration
const * __cdecl boost::python::converter::registry::query(struct
boost::python::type_info)"
(__imp_?query_at_registry@converter_at_python@boost@@YAPBUregistration_at_234@Utype_info_at_34@@Z)
ComputeEntropy.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) void * __cdecl
boost::python::converter::get_lvalue_from_python(struct _object *,struct
boost::python::converter::registration const &)"
(__imp_?get_lvalue_from_python_at_converter@python_at_boost@@YAPAXPAU_object@@ABUregistration_at_123@@Z)
ComputeEntropy.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: struct _typeobject const * __thiscall
boost::python::converter::registration::expected_from_python_type(void)const
"
(__imp_?expected_from_python_type_at_registration@converter_at_python@boost@@QBEPBU_typeobject@@XZ)
ComputeEntropy.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) 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 &)"
(__imp_?rvalue_from_python_stage1_at_converter@python_at_boost@@YA?AUrvalue_from_python_stage1_data_at_123@PAU_object@@ABUregistration_at_123@@Z)
ComputeEntropy.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) const
boost::python::objects::py_function_impl_base::`vftable'"
(__imp_??_7py_function_impl_base_at_objects@python_at_boost@@6B@)
ComputeEntropy.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: __thiscall
boost::python::objects::py_function_impl_base::py_function_impl_base(void)"
(__imp_??0py_function_impl_base_at_objects@python_at_boost@@QAE_at_XZ)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net