|
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-10 11:34:10
On 09/09/2010 11:37 PM, dhruva wrote:
> Hi,
>
> On Fri, Sep 10, 2010 at 1:33 AM, Geoff Hilton
> <geoff.hilton_at_[hidden]> wrote:
>> 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
>
> Based on the errors, I suspect that the linker is not picking up the
> boost python lib for linking! IIRC, there is a way to get the command
> line options that would get sent to the MSVC linker. Go to the project
> in which you have added the extra libraries to link with, in the same
> dialog box somewhere at the bottom, you can see the result of the
> information you set in a way it gets sent to the linker. Please
> examine that to see if you see "libboost_python3-vc90-mt-1_44.lib". I
> hope you have added the folder containing the libs in the lib search
> path (which translates to -L option to the linker).
>
> As a quick and dirty fix to avoid tweaking the project settings manually:
> Add the following line in a top level header that gets included in
> files that use boost.python
> Make sure you have the library search path set or try putting absolute
> path in the pragma.
> #pragma comment( lib, "libboost_python3-vc90-mt-1_44" )
>
> PS: It has been over 2 years since I have worked on Windows
> environment and I have no access to a windows box to try things out
> myself. Also, I have not used boost.python and I am troubleshooting
> more from a generic perspective. My suggestions are based on tough
> memorable experiences try to solve them. My memory might be rusty.
>
> -dhruva
It definitely finds the lib. It looks like it might not be (or no longer
is?) binary compatible. Any other hints would be great though!
Thanks very much,
Geoff
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