@autoreleasepool crashes program with seg fault

132 views Asked by At

I've just installed GNUstep, libobjc2, and llvm on a ubuntu 14.04 box using this script. The installation works for most objective-c2.0 features but not for arc. If I run the following simple program, it crashes as soon as it executes @autoreleasepool with a segmentation fault.

#import <Foundation/Foundation.h>
int main(int argc, char * argv[])
{

@autoreleasepool{
NSLog(@"autoreleasepool works...\n");
}
return 0;
}

I'm compiling with the -fobjc-arc flag. Any suggestions? I've spent two days on this searching the internet. If I use NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init] the program runs.

Mark Allyn

0

There are 0 answers