[英]Clang: error: no such file or directory: 'ObjC' - XCTests
I am trying to write unit test cases for the Objective-C project which has already created. 我正在尝试为已经创建的Objective-C项目编写单元测试用例。 Unit test case target has not selected at the time of project creations. 在创建项目时尚未选择单元测试用例目标。 Now I have added the test case target to the app and the unit test case file also. 现在,我已经将测试用例目标添加到了应用程序中,并且还添加了单元测试用例文件。 When I ran the project got the build error saying XCTest.h file is not available. 当我运行该项目时,出现构建错误, 提示XCTest.h文件不可用。 Now I added XCTest frames work in Build Phase tab of the App target.Now there is a new error saying 现在我在App target的Build Phase选项卡中添加了XCTest框架,现在出现了一个新错误
clang: error: no such file or directory: 'ObjC' 铛:错误:没有这样的文件或目录:'ObjC'
What is the issue? 有什么问题 Why am I getting this? 我为什么得到这个?
After some research This issue is figured out. 经过研究后,这个问题已经解决。
When I removed the ObjC from Other linker flags in XCode build setting of Test target and did a clean build and build the app.Then issue resolved. 当我从Test target的XCode构建设置中的Other linker标志中删除ObjC并进行干净构建并构建应用程序后,问题解决了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.