So, I'm new to Objective-C, and I follow this tutorial . I am running Linux Mint 14. I installed gobjc by running sudo apt-get install gobjc and I already have gcc installed. I am testing their Point example, but I am encountering some strange bugs.
Here is my code (copy and paste from the site):
And I am compiling with gcc Point.m -lobjc -lm .
Here is the error I get:
Point.m: In function 'main': Point.m:52:4: warning: 'Point' may not respond to '+new' [enabled by default] Point.m:52:4: warning: (Messages without a matching method signature [enabled by default] Point.m:52:4: warning: will be assumed to return 'id' and accept [enabled by default] Point.m:52:4: warning: '...' as arguments.) [enabled by default]
It doesn't seem to be able to find the βnewβ method (or maybe alloc / init?).
I searched a lot for this problem, but I could not find a lot. Everything suggests switching to the new GNUStep and NSObject , but I'm writing a program for one of my CS classes, and I think I should stick with objc/Object.h .
At the beginning of the year, we were provided with a pre-configured Ubuntu image for use in VirtualBox, on which we could program, and this program works fine. I am not sure what is there that makes it work. Can Linux Mint 14 not support this old version of Objective-C?
Any help / feedback is appreciated!
source share