So, I installed Ubuntu and clang3.0 and a simple .m program:
#include <Foundation/Foundation.h>
int main()
{
@autoreleasepool{
NSLog(@"Hi");
}
return 0;
}
and I am trying to compile it like this:
clang first.m -I /usr/include/GNUstep/ -lgnustep-base -fconstant-string-class=NSConstantString -objc
and i get
undefined reference to objc_autoreleasePoolPush
undefined reference to objc_autoreleasePoolPop
so I searched googled a bit and installed objc2 and tried:
clang first.m -I /usr/include/GNUstep/ -lgnustep-base -fconstant-string-class=NSConstantString -objc2
but nothing changes. Maybe someone solved the same problem?
source
share