I downloaded CHDataStructures source code (r709), and tried to compile the iOS static library under xCode 4. It complained when compiling:
Can anyone give me some ideas how to compile it?
I downloaded CHDataStructures source code (r709), and tried to compile the iOS static library under xCode 4. It complained when compiling:
Can anyone give me some ideas how to compile it?
As the author of the framework, I was intrigued when Dave DeLong passed this link my way.
Turns out this isn't due to Xcode 4, it's due to changes in the iOS 4.3 SDK (and incidentally, the 10.7 SDK too). I was using the
OBJC_EXPORT
macro with__attribute__((visibility("hidden")))
(for which I defined a macro calledHIDDEN
). This wasn't a problem until 4.3/10.7 changed the definition ofOBJC_EXPORT
macro in/usr/include/objc/objc-api.h
...Previously, it was defined as
OBJC_EXTERN
, but now it's defined asOBJC_EXTERN OBJC_VISIBLE
, which resolves toOBJC_EXTERN __attribute__((visibility("default")))
. Thus, my declarations that usedHIDDEN OBJC_EXPORT
suddenly began resolving to:Basically, the opposing visibility attributes were the cause of the errors. (Ready, fight!)
I've just tested and committed a fix which replaces
HIDDEN OBJC_EXPORT
withHIDDEN
. Apparently those symbols didn't need to be declared asextern
anyway, because it works without those macros.So, the short answer to your question is: update to revision 710. ;-)