Boost logo

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
> :
> : # requirements
> 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:
> 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
      : : : $(PYTHON_PROPERTIES)

(I think)

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at