Hi,
I've got the following program to test the unit test suite:
---------------------------------
// ICFGTest.cpp : Defines the entry point for the console application.
//
#include
using namespace boost::unit_test_framework;
void testPass()
{
BOOST_CHECK( true );
}
test_suite*
init_unit_test_suite( int argc, char* argv[] )
{
test_suite* test= BOOST_TEST_SUITE( "Test test suite" );
test->add( BOOST_TEST_CASE( &testPass ));
return test;
}
---------------------------------
when I link this with the boost v1.30 unit test framework, I get the
following linker errors:
Linking...
libboost_unit_test_framework.lib(unit_test_suite.obj) : error LNK2005:
"public: virtual unsigned long __thiscall
boost::unit_test_framework::test_case::size(void)const "
(?size@test_case@unit_test_framework@boost@@UBEKXZ) already defined in
ICFGTest.obj
ICFGTest.obj : error LNK2019: unresolved external symbol "bool __cdecl
boost::test_toolbox::detail::test_and_continue_impl(bool,struct
boost::test_toolbox::detail::wrapstrstream const &,char const
*,int,bool,enum boost::unit_test_framework::report_level)"
(?test_and_continue_impl@detail@test_toolbox@boost
@@YA_N_NABUwrapstrstream@123@PBDH0W4report_level@u
nit_test_framework@3@@Z)
referenced in function "void __cdecl testPass(void)"
(?testPass@@YAXXZ)
ICFGTest.obj : error LNK2019: unresolved external symbol "public:
__thiscall boost::unit_test_framework::test_suite::test_suite(char
const *)" (??0test_suite@unit_test_framework@boost@@QAE@PBD@Z)
referenced in function "class boost::unit_test_framework::test_suite *
__cdecl init_unit_test_suite(int,char * * const)"
(?init_unit_test_suite@@YAPAVtest_suite@unit_test_
framework@boost@@HQAPAD@Z)
Debug/ICFGTest.exe : fatal error LNK1120: 2 unresolved externals
------------------------
The unresolved symbol test_and_continue_impl seems most curious since
one of it's parameters expects a wrapstrstream, not a wrap_strstream
as the function declaration itself would suggest.
Any ideas what I'm doing wrong? (NOTE: I'm linking to the static
multi-threaded lib).
Thanks!
Dan