|
Boost Users : |
From: d_zakaib (d_zakaib_at_[hidden])
Date: 2003-03-24 22:19:35
Hi,
I've got the following program to test the unit test suite:
---------------------------------
// ICFGTest.cpp : Defines the entry point for the console application.
//
#include <boost/test/unit_test.hpp>
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_at_test_case_at_unit_test_framework_at_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_at_detail@test_toolbox_at_boost
@@YA_N_NABUwrapstrstream_at_123@PBDH0W4report_level_at_u
nit_test_framework_at_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_at_unit_test_framework_at_boost@@QAE_at_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_at_unit_test_
framework_at_boost@@HQAPAD_at_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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net