It seems CPPUnit is not very portable. We finally got a static library to build correctly after we failed trying to build a shared library. But, we were unable to run all the checks because the SUNWspro 5 compiler can't handle the templated member functions in TestSuiteBuilder.h. I'm not suggesting that CPPUnit be dumbed-down to the lowest common denominator, but I would expect it to work on one of the most popular commercial compilers available.
In the end, we commented-out the offending code and are unable to use the addTestCallerForException method.
You may want to try 1.9.8 snapshot
(http://cppunit.sourceforge.net/snapshot/) which no longer use that template member method (though I forgot to remove it from the source so you need to delete it yourself.)
I'd really like to work on CppUnit portability issues, but the only way this can happen is for user to report issues (the template member issue has never been reported until now!), and solution when they have it.
I'm mostly a VC++ guy and now little of the working and oddities of unix compilers...