Skip to content

Instantly share code, notes, and snippets.

@ashwinb
Created February 3, 2011 06:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashwinb/809124 to your computer and use it in GitHub Desktop.
Save ashwinb/809124 to your computer and use it in GitHub Desktop.
error_text
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -o tester -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=20000 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -framework Foundation -framework UIKit main.m
main.m: In function 'main':
main.m:9: warning: format not a string literal and no format arguments
main.m:10: warning: implicit declaration of function 'notify_post'
Undefined symbols:
".objc_class_name_NSAutoreleasePool", referenced from:
literal-pointer@__OBJC@__cls_refs@NSAutoreleasePool in ccdKkhTK.o
".objc_class_name_UIDevice", referenced from:
literal-pointer@__OBJC@__cls_refs@UIDevice in ccdKkhTK.o
".objc_class_name_NSString", referenced from:
literal-pointer@__OBJC@__cls_refs@NSString in ccdKkhTK.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [tester] Error 1
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
// Just compile this thing using "gcc main.m -framework Foundation"
// and it works :)
int main (int argc, char **argv) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString *str = [NSString stringWithFormat:@"UIDevice: %@", [[UIDevice currentDevice] systemVersion]];
NSLog(str);
notify_post("com.apple.language.changed");
[pool release];
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment