|
Boost Users : |
Subject: [Boost-users] [Test] Compiler error/missing entry point?
From: Michael Spece Ibanez (drenami_at_[hidden])
Date: 2009-08-04 23:50:50
I installed the Boost.Test library binary using bootstrap.sh. Is the
following a valid program? If not, what is wrong? Is there a missing
entry point and, if so, how do I run the test?
Source:
#define BOOST_TEST_MODULE ExampleTestModule
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_CASE( my_test )
{
BOOST_CHECK(1);
}
Error:
/cygdrive/c/DOCUME~1/M/LOCALS~1/Temp/ccIao0DX.o:TestExample.cc:(.text+0x155):
undefined reference to
`boost::unit_test::framework::master_test_suite()'
/cygdrive/c/DOCUME~1/M/LOCALS~1/Temp/ccIao0DX.o:TestExample.cc:(.text+0x232):
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>)'
/cygdrive/c/DOCUME~1/M/LOCALS~1/Temp/ccIao0DX.o:TestExample.cc:(.text+0x317):
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, ...)'
/cygdrive/c/DOCUME~1/M/LOCALS~1/Temp/ccIao0DX.o:TestExample.cc:(.text+0x4e0):
undefined reference to
`boost::unit_test::ut_detail::auto_test_unit_registrar::auto_test_unit_registrar(boost::unit_test::test_case*,
unsigned long)'
/cygdrive/c/DOCUME~1/M/LOCALS~1/Temp/ccIao0DX.o:TestExample.cc:(.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>)]+0x54): undefined
reference to `boost::unit_test::ut_detail::normalize_test_case_name(boost::unit_test::basic_cstring<char
const>)'
/cygdrive/c/DOCUME~1/M/LOCALS~1/Temp/ccIao0DX.o:TestExample.cc:(.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>)]+0xa6): 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&)'
/cygdrive/c/DOCUME~1/M/LOCALS~1/Temp/ccIao0DX.o:TestExample.cc:(.text$_ZN5boost9unit_test15unit_test_log_tD1Ev[boost::unit_test::unit_test_log_t::~unit_test_log_t()]+0xb):
undefined reference to `vtable for boost::unit_test::unit_test_log_t'
/cygdrive/c/DOCUME~1/M/LOCALS~1/Temp/ccIao0DX.o:TestExample.cc:(.text$_ZN5boost9unit_test15unit_test_log_tC1Ev[boost::unit_test::unit_test_log_t::unit_test_log_t()]+0x21):
undefined reference to `vtable for boost::unit_test::unit_test_log_t'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a(libcmain.o):(.text+0xab):
undefined reference to `_WinMain_at_16'
collect2: ld returned 1 exit status
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