I would like to use the UnitTest ++ library in the test file. However, it is difficult for me to bring down the library at compile time. So here is my current directory structure:
tests/
UnitTests++/
libUnitTest++.a
src/
UnitTests++.h
unit/
test.cpp
I just used UnitTest ++ start to just get the library setup. Here is test.cpp:
#include <UnitTest++.h>
TEST(FailSpectacularly)
{
CHECK(false);
}
int main()
{
return UnitTest::RunAllTests();
}
And currently I'm trying to compile with:
gcc -lUnitTest++ -L../UnitTest++/ -I../UnitTest++/src/ test.cpp
I am currently getting output with ld: symbol(s) not foundat the end. So, how could I properly include the UnitTest ++ library when it is compiled? I am on a Mac, and I would also like there to be an easy way for people on a Linux machine to run the same tests.
Hope this will provide enough information if you don't tell me.