Object-C运行unit test时报clang: error: linker command failed with exit code 1 (use -v to see invocation)

Object-C运行unit test时报Undefined symbols for architecture x86_64:
"OBJC_CLASSKaTeX parse error: Expected group after '_' at position 119: …nt: _OBJC_CLASS_̲_CMPlistFileAPIUnitTest)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
在这里插入图片描述

解决办法:

选中test的.m文件,Target Membership勾选unit test的文件夹
在这里插入图片描述

参考如下: linker command failed with exit code 1 (use -v to see invocation)

猜你喜欢

转载自blog.csdn.net/q1241580040/article/details/89226399