http://www.ibm.com/developerworks/cn/aix/library/au-ctools1_boost/
http://www.boost.org/doc/libs/1_51_0/libs/test/doc/html/intro.html
1. Why did I get a linker error when compiling my test program? | |
Boost Test Library components provide several usage variants: to create a test program you can link with the one of the precompiled library variants or use single-header variant. For example, to use Unit Test Framework you may either include the < Unresolved external init_unit_test_suite(int, char**). The reason for this error is that in your implementation you should specify second argument of init_unit_test_suite exactly as in the specification, i.e.: char* []. |
add the below in the front of your code
> > #define BOOST_TEST_DYN_LINK
> > and
> > #define BOOST_TEST_MODULE MyTest
codes like: #include <...>
and compile with $g++ -Wall xxx.cpp -lboost_unit_test_framework
refer to test_boost_suit.cpp and sample1.cpp in develop/boost/unit_test/ in ubuntu