
Vladimir Prus <ghost@cs.msu.su> writes:
David Abrahams wrote:
It made things work :)
IIRC, libpythonXX.a on *nix requires these libraries. Why is this mysterious?
Why it requires -pthread only whem <define>BOOST_PYTHON_STATIC_LIB is in properties.
I don't know, unfortunately.
There are two usual ways to use Python on *nix:
1. extending, where the Python executable dynamically loads Python extension modules and they use the Python API that's statically linked into the Python executable. In this model, the Python executable is linked to whatever libraries it needs, such as pthreads and dl.
2. embedding, where a user-written executable uses the Python API in libpythonXX.a. In that case, who is going to link to pthreads and dl if not the user-written executable.
Then, how <define>BOOST_PYTHON_STATIC_LIB is related to those cases.
It shouldn't be.
It's quite feasible to embed python and use shared linking to Boost.Python at the same time.
Yes.
2. In V2, shared linking to Boost.Python is used, and the application is fully shared. So, where does the link error come from? Is comment even more inaccurate?
Than what?
I mean, -pthread is required for all embedding, even if linking to Boost.Python is shared. Right?
I believe so. -- Dave Abrahams Boost Consulting www.boost-consulting.com