Error compiling iOS app

Hi,

I’m having some trouble compiling an application for iOS with clang/llvm 3.7.

I always get the same type of errors:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_UIResponder", referenced from:
      _OBJC_CLASS_$_AppDelegate in AppDelegate.o
  "_OBJC_METACLASS_$_UIResponder", referenced from:
      _OBJC_METACLASS_$_AppDelegate in AppDelegate.o
  "_UIApplicationMain", referenced from:
      _main in main.o
  "_OBJC_METACLASS_$_UIViewController", referenced from:
      _OBJC_METACLASS_$_ViewController in ViewController.o
  "_OBJC_CLASS_$_UIViewController", referenced from:
      _OBJC_CLASS_$_ViewController in ViewController.o
ld: symbol(s) not found for architecture arm64

or (in an other project):

Undefined symbols for architecture arm64:
"_UIApplicationMain", referenced from:
     _main in main.o
ld: symbol(s) not found for architecture arm64

I have the same problem with armv7 or armv7s. But not when I compile my application for the emulator (i386).
Is there a way to fix this problem?

Thx!

Found the solution to my problem…
I had to add UIKit.framwork manually in Xcode build phase under “Link Binary With Libraries”.

I guess that Apple clang has some ‘magic’ that do that automatically!

Cheers