Eu sou novato para Ubuntu e Boost. Eu instalei o Ubuntu 11.10 e segui as instruções do site (http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/) para testar o teste de unidade BOOST. Eu instalo a biblioteca de reforço e copio o código como na parte 3 e tento executá-lo, mas tenho erros durante a execução.
8w6Wa.o: In function 'init_unit_test()':
bTest.cpp:(.text+0x51): undefined reference to
'boost::unit_test::framework::master_test_suite()'
/tmp/ccZ8w6Wa.o: In function 'main':
bTest.cpp:(.text+0x9f): undefined reference to
'boost::unit_test::unit_test_main(bool (*)(), int, char**)'
/tmp/ccZ8w6Wa.o: In function 'universeInOrder::test_method()':
bTest.cpp:(.text+0x121): undefined reference to
'boost::unit_test::unit_test_log_t::set_checkpoint(boost::unit_test::basic_cstring<char
const>, unsigned int, boost::unit_test::basic_cstring<char const>)'
bTest.cpp:(.text+0x1e3): undefined reference to
'boost::test_tools::tt_detail::check_impl(boost::test_tools::predicate_result
const&, boost::unit_test::lazy_ostream const&, boost::unit_test::basic_cstring<char
const>, unsigned int, boost::test_tools::tt_detail::tool_level,
boost::test_tools::tt_detail::check_type, unsigned int, ...)'
/tmp/ccZ8w6Wa.o: In function '__static_initialization_and_destruction_0(int, int)':
bTest.cpp:(.text+0x2ea): undefined reference to
'boost::unit_test::ut_detail::auto_test_unit_registrar::auto_test_unit_registrar(boost::unit_test::test_case*,
unsigned long)'
/tmp/ccZ8w6Wa.o: In function 'boost::unit_test::unit_test_log_t::unit_test_log_t()':
bTest.cpp:(.text._ZN5boost9unit_test15unit_test_log_tC2Ev[_ZN5boost9unit_test15unit_test_log_tC5Ev]+0x21):
undefined reference to 'vtable for boost::unit_test::unit_test_log_t'
/tmp/ccZ8w6Wa.o: In function
'boost::unit_test::make_test_case(boost::unit_test::callback0<boost::unit_test::ut_detail::unused>
c onst&, boost::unit_test::basic_cstring<char const>)':
bTest.cpp:(.text._ZN5boost9unit_test14make_test_caseERKNS0_9callback0INS0_9ut_detail6unusedEEENS0_13basic_cstringIKcEE[boost::unit_test::make_test_case(boost::unit_test::callback0<boost::unit_test::ut_detail::unused>
const&, boost::unit_test::basic_cstring<char const>)]+0x1d): undefined reference to
'boost::unit_test::ut_detail::normalize_test_case_name(boost::unit_test::basic_cstring<char
const>)'
bTest.cpp:(.text._ZN5boost9unit_test14make_test_caseERKNS0_9callback0INS0_9ut_detail6unusedEEENS0_13basic_cstringIKcEE[boost::unit_test::make_test_case(boost::unit_test::callback0<boost::unit_test::ut_detail::unused>
const&, boost::unit_test::basic_cstring<char const>)]+0x5d): undefined reference to
'boost::unit_test::test_case::test_case(boost::unit_test::basic_cstring<char const>,
boost::unit_test::callback0<boost::unit_test::ut_detail::unused> const&)'
/tmp/ccZ8w6Wa.o: In function 'boost::unit_test::unit_test_log_t::~unit_test_log_t()':
bTest.cpp:(.text._ZN5boost9unit_test15unit_test_log_tD2Ev[_ZN5boost9unit_test15unit_test_log_tD5Ev]+0xb):
undefined reference to 'vtable for boost::unit_test::unit_test_log_t'
collect2: ld returned 1 exit status
Eu também tento instalar o sudo apt-get install libboost-dev-all ainda com o mesmo erro.
Por favor me ajude a resolver este problema. Agradecemos antecipadamente.