我有一个makefile,如答案中所述:
我在我的 cpp 文件中有:
#include "CppUTest/CommandLineTestRunner.h"
int main(int ac, const char** av)
{
/* These checks are here to make sure assertions outside test runs don't crash */
CHECK(true);
LONGS_EQUAL(1, 1);
return CommandLineTestRunner::RunAllTests(ac, av);
}
然后我得到错误:
undefined reference to `CommandLineTestRunner::RunAllTests(int, char const**)'
有什么想法可以尝试吗?