iam beginner in Objective-C, i tried to compile small Hello world program to start,iam using windows vista and the shell console, my code is:
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
// insert code here...
NSLog(@"Hello, World!");
[pool drain];
return 0;
}
the shell result show me the following error:
Foundation.h: no such file found
my command for compiling is:
gcc -o hello hello.m
i will appreciate any help, thanx in advance :)
Foundation, as well as NSAutoreleasePool and NSLog are part of cocoa and cocoa-touch, Apples exclusive ObjC Frameworks. While you can use Objective-C, Foundation and all Foundation classes and functions are only available on Mac OS X and iOS.
You have three choices if you want to continue working with ObjC und the classes
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