Reputation: 281
I just upgraded my Mac to Lion and then Xcode 4.1. My iPhone project which worked well with Xcode 4.0 had 401 errors in Xcode 4.1.
I googled the solution and got two useful ways.
#import "/usr/include/sqlite3.h"
to #import <sqlite3.h>
Now the number of errors reduced to 15, saying
Expected function body after function declarator
on OBJC_ARC_UNAVAILABLE
in file Runtime.h, which is a built-in source file.
I tried to change iOS Deployment Target from iOS 3.0 to iOS 4.1 and set Other C Flags as
-D__IPHONE_OS_VERSION_MIN_REQUIRED=040100
But neither of them worked.
Any help will be appreciated. Thank you.
Upvotes: 1
Views: 823
Reputation: 190
I had the same issue, and was able to resolve it by changing this
#import "/usr/include/objc/runtime.h"
to this
#import <objc/runtime.h>
where ever I included this file. This change appears backward compatible with 4.0.2 running under Snow Leopard as well.
Upvotes: 3