In this case, I wouldn't fault the docs per se but rather only my impatience in having tried "jumping directly to the subject of [my] interest" but not yet having realized exactly what my subject of interest really is/was nor how far I needed to jump in
order to get to it ;-) I had been trying this:
$ cat cma.cpp
#define BOOST_TEST_MODULE cma
#include <boost/test/unit_test.hpp>
#include <iostream>
#include <ostream>
BOOST_AUTO_TEST_CASE(sanity)
{
std::clog << "Test the world!\n";
}
$ ${CXX} -c --std=c++0x -g -I${TARGET}/include cma.cpp -o cma.o
$ ${CXX} --std=c++0x -g cma.o ${TARGET}/lib/libboost_unit_test_framework.dylib -o cma
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
$
But when I started reading through more of the documentation and got as far as <
http://preview.tinyurl.com/lw7e688>, I realized that I needed to be doing something more like this:
$ ${CXX} -c --std=c++0x -g -DBOOST_TEST_DYN_LINK -I${TARGET}/include cma.cpp -o cma.o
$ ${CXX} --std=c++0x -g cma.o ${TARGET}/lib/libboost_unit_test_framework.dylib -o cma
$ env DYLD_LIBRARY_PATH=${TARGET}/lib ./cma
Running 1 test case...
Test the world!
*** No errors detected
$
Thank you, Gennadiy, for having taken the time to respond to my question as well as having taken the time you spent on Boost.Test.