I have done alot of research on this and only find people complaining about this error when there building a cocoa app on the iPhone.
I recently Grabbed the source for Colloquy for Mac and did everything it asked and ('Cocoa/Cocoa.h' File not found)
Here is the chunk of code that #import's everything.
#define ENABLE(FEATURE) (defined(ENABLE_##FEATURE) && ENABLE_##FEATURE)
#define SYSTEM(NAME) (defined(SYSTEM_##NAME) && SYSTEM_##NAME)
#define LIKELY(x) __builtin_expect((x) ? 1 : 0, 1)
#define UNLIKELY(x) __builtin_expect((x) ? 1 : 0, 0)
#define SYSTEM_MAC 1
#ifdef __OBJC__
#ifdef COMMAND_LINE_UTILITY
#import <Foundation/Foundation.h>
#else
#import <Cocoa/Cocoa.h>
#endif
#import "NSCharacterSetAdditions.h"
#import "NSDataAdditions.h"
#import "NSDictionaryAdditions.h"
#import "NSMethodSignatureAdditions.h"
#import "NSNotificationAdditions.h"
#import "NSObjectAdditions.h"
#import "NSScannerAdditions.h"
#import "NSStringAdditions.h"
#endif
#import "MVUtilities.h"
#if !defined(__unsafe_unretained)
#define objc_unretainedObject(object) (id)(object)
#endif
I have re-linked the frameworks so no need to ask me if I tried that. :)
Help will be much appreciated :D
Are you trying to build Colloquy for iOS? If you're not, skip the first section.
Your problem is that you're importing Cocoa/Cocoa.h. This is really two problems:
So, after you change the SDK from a Mac SDK to an iOS SDK, take out Cocoa.framework and the import of Cocoa.h, and add Foundation and UIKit (and any other frameworks you need) and import their headers.
There are two projects in the Colloquy trunk: One for Mac OS X, the other for iOS. Make sure you're opening and trying to build the right project.
If you are intentionally trying to build the Mac project, and that's what's failing, make sure you have the necessary Mac SDK installed. Examine the project's build settings to see which one their project uses, then install it from your Xcode disk image. (If you installed Xcode via the MAS, I don't know what, if anything, you'll need to do.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With