This is the current code that I have from their fundamental example: http://unittest-cpp.sourceforge.net/UnitTest++.html
#include <unittest++/UnitTest++.h> TEST(FailSpectacularly) { CHECK(false); } int main() { return UnitTest::RunAllTests(); }
An inclusion exists, but I get errors: undefined reference to UnitTest::Test::* and UnitTest::* , where * is some arbitrary class / method in the UnitTest ++ library.
undefined reference to UnitTest::Test::*
UnitTest::*
*
How can I get this to compile correctly?
Found the answer here: http://comments.gmane.org/gmane.comp.lang.c%2B%2B.unittest%2B%2B.devel/13
Define the library path -L/usr/include and the library -lunittest++
-L/usr/include
-lunittest++
Mostly for my future reference, but I sorted it by linking it to the last library.
g++ test.cpp -lunittest++