|
Boost Users : |
Subject: Re: [Boost-users] Link errors building against Boost Python
From: Jürgen Hunold (juergen.hunold_at_[hidden])
Date: 2011-05-17 02:15:46
Hi Chris,
seems everybody is busy at BoostCon.
On Thursday, 12. May 2011 18:30:00 Chris Weisiger wrote:
> and then built Boost's Python libraries with
>
> > bjam.exe --toolset=msvc-9.0 --address-model=64 --with-python
This should read:
bjam.exe toolset=msvc-9.0 address-model=64 --with-python
Boost.Build options don't have "--".
The generated path names should contain "address-model-64".
> PyFTGL uses Python's distutils to build, which doesn't know how to find
libraries whose names start with "lib", so I renamed the .lib files in the
stage/lib directory: "libboost_python-vc90-mt-1_46_1.lib" to "boost_python-
vc90-mt-1_46_1.lib" and so on.
This is wrong. Files starting with "lib" are static libraries. See the docs
at http://www.boost.org/doc/libs/1_46_1/more/getting_started/windows.html
especially
http://www.boost.org/doc/libs/1_46_1/more/getting_started/windows.html#or-
build-binaries-from-source
on how to get shared/all library variants.
> Then I tried to build PyFTGL with this:
> > C:\Python27x64\python.exe setup.py build
>
> I get 41 link errors. Here's the first:
>
> ftgl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport)
> protected: __cdecl boost::python::detail::tuple_base::tuple_base(struct
> boost::python::detail::new_reference_t *)"
> (__imp_??0tuple_base_at_detail@python_at_boost@@IEAA_at_PEAUnew_reference_t_at_123@@Z)
> referenced in function "public: __cdecl boost::python::tuple::tuple(struct
> boost::python::detail::new_reference_t *)"
> (??0tuple_at_python@boost@@QEAA_at_PEAUnew_reference_t_at_detail@12@@Z)
>
> I've put the entire output up on a pastebin here:
> http://pastebin.com/iuPzKdKs
And the setup py complain about not finding the shared libs
("__declspec(dllimport))") is a sure sign of this
> Any ideas what's going wrong here? Thanks for any suggestions!
Hope this helps.
Yours,
Jürgen
-- * Dipl.-Math. Jürgen Hunold ! Ingenieurgesellschaft für * voice: ++49 511 262926 57 ! Verkehrs- und Eisenbahnwesen mbH * fax : ++49 511 262926 99 ! Lister Straße 15 * juergen.hunold_at_[hidden] ! www.ivembh.de * * Geschäftsführer: ! Sitz des Unternehmens: Hannover * Prof. Dr.-Ing. Thomas Siefer ! Amtsgericht Hannover, HRB 56965 * PD Dr.-Ing. Alfons Radtke !
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