From: Bojan Resnik (resnikb_at_[hidden])
Date: 2005-09-22 12:15:20
> > Unfortunately, the second library used several boost libraries and
> > the test harness used the boost unit test framework. (I say
> > unfortunately only because I have not been able to get it to link, we
> > love the boost libraries we are using). I added the include path in
> > the project root's Jamfile and it compiles but I get a link error
> > because the boost unit test framework does not automatically link. I
> > apologize if this is a dumb question but I cannot figure out how to
> > add a library to the link command. There is an example in the
> > documentation but for some reason I find it confusing and it doesn't
> > make clear how it handles a library whose name depends on the compile
> > time flags (i.e. libboost_unit_test_framework-vc71-mt-gd-1_33.lib).
> > Any help would be appreciated.
> It would help if you would post your Jamfiles and the error message
> you're seeing.
[ Sorry for replying to your message, but I did not receive the OP's message ]
I had the same problem, and solved it by explicitly adding Boost.Test
to my project's dependencies:
exe my-test : test.cpp
This has the added bonus that you don't have to worry about the naming
of the test library.
On a side note, including boost test (or any of the boost libraries)
like this, causes a longer pause before bjam starts constructing. It
seems that recursive globbing through subdirectories done in
boost/Jamfile.v2 is taking quite some time. I altered boost's Jamfile
to skip globbing if "--nothing" is specified as command-line
parameter, but that seems like a brute thing to do :) Is there a more
-- Bojan Resnik
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk