|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2006-03-06 12:55:57
Vladimir Prus <ghost_at_[hidden]> writes:
> Dave,
> in Boost.Python testsuite, there's test 'exec' defined like this:
>
> run ../test/exec.cpp <lib>../build/boost_python
> : # program args
> : exec.py
> : # requirements
> $(PYTHON_PROPERTIES)
> <define>BOOST_PYTHON_STATIC_LIB
> <define>BOOST_PYTHON_STATIC_MODULE
>
>
> Is static linking to Boost.Python intended here specifically, say, because the test
> will never work with dynamic linking, or just to test static linking?
The latter.
> I'm asking because in V2, that uses dynamic linking in this test, the following link
> error is produced:
>
> exec.obj : error LNK2019: unresolved external symbol "class
> boost::python::api::object __cdecl boost::python::exec(
>
> See:
>
> http://tinyurl.com/hxo2t
>
>
> I'm about to change V2 Jamfile to use static linking, but wanted to check
> with you that static linking is indeed required and that the above error is
> not V2 fault.
It seems unlikely that it's v2's fault, but static linking is not
supposed to be required. The easy way to test it is to build the same
test in v1 using dynamic linking:
run ../test/exec.cpp <dll>../build/boost_python
: : exec.py : $(PYTHON_PROPERTIES)
<define>BOOST_PYTHON_STATIC_MODULE ;
(I think)
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk