Am I missing something when I get undefined references to main using
boost 1.34.1. Here is a minimal example
#include <iostream>
#include
void my_test_function()
{
std::cout << "hi there" << std::endl;
}
boost::unit_test::test_suite* init_unit_test_suite( int , char*[] )
{
boost::unit_test::test_suite* test = BOOST_TEST_SUITE( "Master
test suite" );
test->add( BOOST_TEST_CASE( &my_test_function ) );
return test;
}
This is copied off of the main page. Here is the compilation line
g++ test.cpp -o test -lboost_unit_test_framework-gcc41
With gcc version 4.1.2
Here is the error message:
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crt1.o: In function
`_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
Any insight?
Chris Miceli