Reputation: 331
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)
Upvotes: 0
Views: 317
Reputation: 715
Oups, sorry… You are missing a link to the CoreFoundation framework!
LIBS += CoreFoundation
Upvotes: 0