S
suresh
Hi,
the following code does not compile and being a newbie, i am unable to
figure it out. could you please help?
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
int add( int i, int j ) { return i+j; }
BOOST_AUTO_TEST_CASE( my_test ){
BOOST_CHECK( add( 2,2 ) == 4 );
}
compiled with the command, g++ test.cpp -lboost_unit_test_framework
Error: undefined reference to `main'
thanks
suresh
the following code does not compile and being a newbie, i am unable to
figure it out. could you please help?
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
int add( int i, int j ) { return i+j; }
BOOST_AUTO_TEST_CASE( my_test ){
BOOST_CHECK( add( 2,2 ) == 4 );
}
compiled with the command, g++ test.cpp -lboost_unit_test_framework
Error: undefined reference to `main'
thanks
suresh