On 19.07.2012, at 15:01, Joe Armstrong wrote:
$ clang -framework Foundation main.m -o main
compiles your main.m
No quite:
clang -framework Foundation main.m -o main
main.m:14:5: error: unexpected '@' in program
@autoreleasepool {
^
1 error generated.
maybe the compiler doesn't recognize the file as an objective-c file.
$ clang -fobjc-arc -x objective-c -framework Foundation -o main main.m
(-fobjc-arc enables ARC, -x objective-c tells the compiler to use objective-c).
This xcode thing is a total nightmare - some kind of advanced video game
with ten quadzillion options for everything
:) reminds me on the discussion on the erlang mailing list "Looking for slides of a lightning talk",
just the other way around. But yes, I am using Xcode for years, and I am often lost too.
Cheers,