views:

70

answers:

1

Hey guys,

I made a new project in XCode (console application). Then I added a new Objective-C class and compiled it. However, it wouldn't build. Here are the errors I am seeing:

Undefined symbols:
  "_objc_msgSendSuper", referenced from:
      -[Terminal init] in Terminal.o
      -[Terminal dealloc] in Terminal.o
  ".objc_class_name_NSObject", referenced from:
      .objc_class_name_Terminal in Terminal.o
ld: symbol(s) not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Terminal is the name of the new class that I added. Thanks for any help!

+4  A: 

Sounds like you didn't link with the Cocoa framework (C console programs don't do it by default). Right-click your project, go to "Add", and select "Existing Frameworks..." Find Cocoa.framework in there and build again.

zneak