简体   繁体   English

Xcode 6.1.1 xctest版本

[英]Xcode 6.1.1 xctest release

I create a new project and set (run) build configuration release,the issue. 我创建一个新项目并设置(运行)构建配置版本,即问题。

This is my code. 这是我的代码。

#import "ViewController.h"

@interface testTests : XCTestCase

@end

@implementation testTests

- (void)testExample {
  ViewController *vc = [[ViewController alloc] init];
  XCTAssertNotNil(vc);
}

@end

issue 问题

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_ViewController", referenced from: objc-class-ref in testTests.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) 架构x86_64的未定义符号:“ _ OBJC_CLASS _ $ _ ViewController”,引用自:testTests.o中的objc-class-ref ld:架构x86_64的clang找不到符号:错误:链接器命令失败,退出代码为1(使用-v查看调用)

糟糕,抱歉……您缺少指向CoreFoundation框架的链接!

LIBS += CoreFoundation

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM