On 09/09/2010 12:06 AM, dhruva wrote:
Hello,
On Thu, Sep 9, 2010 at 12:32 AM, Geoff Hilton
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@py_function_impl_base@objects@python@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@objects@python@boost@@UAE@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@objects@python@boost@@YA?AVobject@api@23@ABUpy_function@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@detail@python@boost@@YAPAU_object@@PBDP6AXXZ@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@detail@python@boost@@YAXPBDABVobject@api@23@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@registry@converter@python@boost@@YAABUregistration@234@Utype_info@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@registry@converter@python@boost@@YAPBUregistration@234@Utype_info@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@converter@python@boost@@YAPAXPAU_object@@ABUregistration@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@registration@converter@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@converter@python@boost@@YA?AUrvalue_from_python_stage1_data@123@PAU_object@@ABUregistration@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@objects@python@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@objects@python@boost@@QAE@XZ)