|
Boost-Build : |
From: Jason Stewart (jstewart_at_[hidden])
Date: 2005-09-22 14:16:01
>
>It would help if you would post your Jamfiles and the error message
>you're seeing.
Ok, I guess I should have done that the first time but I didn't
because I *know* it's not configured correctly, I'm just not sure how
it should be. I have not told it anywhere that it needs to link
against boost_unit_test_framework. Anyway, I have a project tree like so:
\myproject
\Geodesy
\Ptolemy
In the project root directory I have the following files:
--- Jamfile ---
project myproject
: requirements <include>$(PROJECT_ROOT)
<include>$(BOOST_ROOT)/include/boost-1_33/
<library-path>$(BOOST_ROOT)/lib
: build-dir bin
;
import testing ;
--- project-root.jam ---
path-constant PROJECT_ROOT : . ;
path-constant BOOST_ROOT : c:/boost ;
In the Ptolemy directory I have the following:
--- Jamfile ---
project Ptolemy ;
unit-test test : [ glob test/*.cpp ] Ptolemy
lib Ptolemy : [ glob *.cpp ] ../Geodesy//Geodesy
: <link>static
;
The Geodesy directory builds and links correctly.
The error message that I get is a standard linker error:
ControlTest.obj : error LNK2019: unresolved external symbol
"public: __thiscall boost::unit_test::test_suite::test_suite(class
boost::unit_test::basic_cstring<char const >)" (??0test_suite@
unit_test_at_boost@@QAE_at_V?$basic_cstring@$$CBD_at_12@@Z)
referenced in function "public: __thiscall boost::unit_test::
auto_unit_test_suite_t::auto_unit_test_suite_t(void)"
(??0auto_unit_test_suite_t_at_unit_test_at_boost@@QAE_at_XZ)
Followed by about 8 more messages indicating that the
unit_test_framework was not included by the linker.
I tried the suggestion of another poster and included "
$(BOOST_ROOT)/lib/libboost_unit_test_framework-vc71-mt-gd-1_33.lib"
as an input for the "unit test" target and it did work but I was
hoping for a way to get the "-vc71-mt-gd-1_33.lib" part right without
having to do a lot of checking myself. Actually, I think he was
including the source code directly which will avoid the naming
problem but it doesn't solve the more general case.
Thanks,
Jason Stewart
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