--------------------Configuration: AllTests - Win32 Debug--------------------
Linking...
AllTests.obj : error LNK2001: unresolved external symbol "int externTestGroupMockDocumentation" (?externTestGroupMockDocumentation@@3HA)
AllTests.obj : error LNK2001: unresolved external symbol "int externTestGroupEventDispatcher" (?externTestGroupEventDispatcher@@3HA)
Debug/AllTests.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
AllTests.exe - 3 error(s), 0 warning(s)
为什么会出现这些错误,我该如何解决?
最佳答案
您的AllTests.cpp中有这些行吗?
IMPORT_TEST_GROUP(MockDocumentation)
IMPORT_TEST_GROUP(EventDispatcher)
如果这样做,则还需要在构建中定义以下测试组:
TEST_GROUP(MockDocumentation)
TEST_GROUP(EventDispatcher)
詹姆士
关于c - CppUtest示例链接错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/6797705/