I want to provide my own main function while using Boost.Test. So I have included the following macros:
#define BOOST_TEST_ALTERNATIVE_INIT_API
#define BOOST_TEST_NO_MAIN
My main function looks like this:
int main(int argc, char* argv[])
{
int exitCode = ::boost::unit_test::unit_test_main(&initialise, argc, argv);
return exitCode;
}
I have also created the function initialise
.
When built on OS X using Xcode 6 the following error is reported:
Undefined symbols for architecture x86_64:
"boost::unit_test::unit_test_main(bool (*)(), int, char**)", referenced from:
_main in main.o
I am linking-in the unit test framework library.
Can someone please help resolve the error?