
27 Sep
2005
27 Sep
'05
9:33 a.m.
I had modify this example a little, since without "#define geaendert_RK" it did not compile - neither with nor without libs.
It should.
#include <boost/test/unit_test.hpp>
#define geaendert_RK // required to compile with g++, BCB6 - RK #ifndef geaendert_RK using boost::unit_test::test_suite;//Unresolved external '_main' - RK #else #include <boost/test/included/unit_test_framework.hpp> using namespace boost::unit_test_framework; #endif Why does this compile without any libs?
With the define, it #includes the full source of the library via <boost/test/included/unit_test_framework.hpp>. Without it you need to link against the unit test lib which will contain your program's main. John.