Boost logo

Boost Users :

Subject: Re: [Boost-users] Link Boost::Python statically
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-02-24 20:54:52


AMDG

Marcin Simonides wrote:
> I'm trying to link my Python extension module with static version of
> Boost::Python library.
>
> According to documentation, the auto_link facility should by default
> supply the library for static linking
> (libboost_python-vc80-mt-gd-1_38.lib in my case).
> Unfortunately it doesn't work that way for me - I get the import lib
> by default and have to supply boost_python dll.
>
> If I specifically provide the statically linked lib to the linker I
> get errors that symbols are defined multiple times by both the static
> library and the import library.
>
> I was able to link statically by:
> - defining BOOST_ALL_NO_LIB,
> - defining BOOST_PYTHON_STATIC_LIB,
> - adding libboost_python-vc80-mt-gd-1_38.lib to link libraries.
>
> While this worked I have a strong feeling that it's not the way it was
> meant to be.
Defining BOOST_PYTHON_STATIC_LIB should be enough.

In Christ,
Steven Watanabe


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