I used to build for mac using Qt framework and now starting to use Cocoa an Obj-C. I have got strange error messages pointing to the Foundation Library so the fail must come from anywhere but not the code because is coming from the book and no faults on compiling. My version of Xcode is 3.2.2 and it did no created a lottery.m but a main.c on resources folder. Building without changing the extension of the file generate thousand of “expected identifier or ‘(’ before ‘@’ token” in NSObjCRuntime.h, NSValueTransformer.h and many more. Renaming the main source file extension to ‘.m’ it generates five fails, a collect 2 with those details:
“OBJC_CLASS_NSAutoreleasePool", referenced from: objc-class-ref-to-NSAutoreleasePool in lottery.o "_objc_msgSend", referenced from: _main in lottery.o _main in lottery.o _main in lottery.o _main in lottery.o (maybe you meant: l_objc_msgSend_fixup_objectAtIndex_, l_objc_msgSend_fixup_addObject_ , l_objc_msgSend_fixup_alloc ) "_objc_msgSend_fixup", referenced from: l_objc_msgSend_fixup_alloc in lottery.o l_objc_msgSend_fixup_addObject_ in lottery.o l_objc_msgSend_fixup_objectAtIndex_ in lottery.o (maybe you meant: l_objc_msgSend_fixup_objectAtIndex_, l_objc_msgSend_fixup_addObject_ , l_objc_msgSend_fixup_alloc ) "_OBJC_CLASS__NSNumber”, referenced from:
objc-class-ref-to-NSNumber in lottery.o
"_NSLog", referenced from:
_main in lottery.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
I've done a few search by myself and found something but not the solution and maybe will be a compiler or build setup someone probably had this before.