I have a project use cppunit for unit test, I used QTtestrunner to show the result here is the code
CPPUNIT_NS::QtUi::TestRunner testrunner;
testrunner.addTest (CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest());
testrunner.run (true);
but I have this message in compiling:
src/main.cpp:78: undefined reference to 'CppUnit::QtTestRunner::QtTestRunner()'
src/main.cpp:79: undefined reference to CppUnit::QtTestRunner::addTest(CppUnit::Test*)'
src/main.cpp:80: undefined reference to CppUnit::QtTestRunner::run(bool)'
src/main.cpp:91: undefined reference to 'CppUnit::QtTestRunner::~QtTestRunner()'
I know there is a problem of linking but I include all what I need libcppunit.a and libcppunit.so
Qt version difference is the problem. You can download this patch It converts to Qt3, then you can convert it to Qt4 using "qt3to4".
Also you need to add qt3 support into your pro file when you are using qttestrunner.a library.
QT += qt3support