|
Boost : |
From: Jody Hagins (jody-boost-011304_at_[hidden])
Date: 2005-02-24 17:06:44
Working off current CVS, I have the following file...
#define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp>
BOOST_AUTO_UNIT_TEST( test1 )
{
BOOST_CHECK(true);
}
BOOST_AUTO_UNIT_TEST( test2 )
{
BOOST_CHECK(true);
}
as shown in the examples, but when I compile, I get liner errors for
missing main and test functions.
shandalle:jody> g++ -I${BOOST_ROOT} 5_2_8_1.cpp -o 5_2_8_1
/usr/lib/crt1.o: In function `_start':
/usr/lib/crt1.o(.text+0x18): undefined reference to `main'
/tmp/cccXBUDu.o: In function `test1()':
/tmp/cccXBUDu.o(.text+0xec): undefined reference to
`boost::test_tools::tt_detail::check_impl(boost::test_tools::predicate_
result const&, boost::basic_wrap_stringstream<char>&,
boost::unit_test::basic_cstring<char const>, unsigned,
boost::test_tools::tt_detail::tool_level,
boost::test_tools::tt_detail::check_type, unsigned, ...)'
/tmp/cccXBUDu.o: In function `test2()':
/tmp/cccXBUDu.o(.text+0x242): undefined reference to
`boost::test_tools::tt_detail::check_impl(boost::test_tools::predicate_
result const&, boost::basic_wrap_stringstream<char>&,
boost::unit_test::basic_cstring<char const>, unsigned,
boost::test_tools::tt_detail::tool_level,
boost::test_tools::tt_detail::check_type, unsigned, ...)'
/tmp/cccXBUDu.o: In function
`boost::unit_test::make_test_case(boost::unit_test::callback0<boost::un
it_test::ut_detail::unused> const&, boost::unit_test::basic_cstring<char
const>)':
/tmp/cccXBUDu.o(.gnu.linkonce.t._ZN5boost9unit_test14make_test_caseERKN
S0_9callback0INS0_9ut_detail6unusedEEENS0_13basic_cstringIKcEE+0x3b):
undefined reference to
`boost::unit_test::ut_detail::normalize_test_case_name(boost::unit_test
::basic_cstring<char const>)'
/tmp/cccXBUDu.o(.gnu.linkonce.t._ZN5boost9unit_test14make_test_caseERKN
S0_9callback0INS0_9ut_detail6unusedEEENS0_13basic_cstringIKcEE+0x70):
undefined reference to
`boost::unit_test::test_case::test_case[in-charge](boost::unit_test::ba
sic_cstring<char const>,
boost::unit_test::callback0<boost::unit_test::ut_detail::unused>
const&)'
/tmp/cccXBUDu.o: In function
`boost::unit_test::ut_detail::auto_unit_test_suite()':
/tmp/cccXBUDu.o(.gnu.linkonce.t._ZN5boost9unit_test9ut_detail20auto_uni
t_test_suiteEv+0x4e): undefined reference to
`boost::unit_test::test_suite::test_suite[in-charge](boost::unit_test::
basic_cstring<char const>)'
/tmp/cccXBUDu.o: In function
`boost::unit_test::ut_detail::auto_unit_test_registrar::auto_unit_test_
registrar[in-charge](boost::unit_test::test_case*)':
/tmp/cccXBUDu.o(.gnu.linkonce.t._ZN5boost9unit_test9ut_detail24auto_uni
t_test_registrarC1EPNS0_9test_caseE+0x26): undefined reference to
`boost::unit_test::test_suite::add(boost::unit_test::test_unit*,
unsigned long, unsigned)'
collect2: ld returned 1 exit status
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk