Could you forward me the original message (just joined the mailing list!)
Surely though this is a job for search engines?
http://ubuntuforums.org/showthread.php?t=1064045 the first result.
http://gcc.gnu.org/onlinedocs/gcc/Objective_002dC.html this *will* have
some useful stuff.
The most useful one however will probably be:
http://en.wikibooks.org/wiki/Objective-C_Programming/Getting_Started
Enjoy
Alec
On 21/01/13 13:04, Åke Forslund wrote:
I'm not an expert on Objective-C (in fact I haven't worked with it at all) so take my advice with a grain of salt. I think your hello world test is a bit over complicated, I tried this example (found on Swedish Wikipedia):
#import <stdio.h>
#import <objc/Object.h>
@interface MyClass : Object {
}
- (void)world;
@end
@implementation MyClass
- (void)world {
printf("hello, World!\n");
}
@end
int main() {
id hello = [MyClass new];
[hello world];
return 0;
}
I compiled with gcc hello.m -lobjc -o hello
This worked with no warnings and printed "Hello World!" as expected. (I must admit that my gcc is somewhat old 4.4.5)
/Åke
Åke Forslund
Lasermax Roll Systems
Tel: +46 (0) 372-25639
-----Ursprungligt meddelande-----
Från: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] För niXman
Skickat: den 18 januari 2013 21:49
Till: gcc-help@xxxxxxxxxxx
Ämne: Re: How to compile Objective-C code with GCC ?
ping?