I’m getting this error when building in Xcode for iOS.
Undefined symbols for architecture i386:
"_CGRectInset", referenced from:
-[RootViewController viewDidLoad] in RootViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The app is a clean project, just built from the template Xcode provides.
Any ideas?
I had the same problem with a project created from “Page-Based Application” template, in XCode4 Developer Preview 5.
You can fix it by adding the CoreGraphics framework to the list of linked frameworks and libraries. In other words:
Then it builds and runs.