= ObjectiveC = * http://www.maheshsubramaniya.com/article/hello-world-in-objective-c-and-compiling-with-gcc.html == Example with gcc and gnustep == {{{#!highlight objectivec /* http://ftpmain.gnustep.org/pub/gnustep/core/gnustep-make-2.6.8.tar.gz http://ftpmain.gnustep.org/pub/gnustep/core/gnustep-base-1.24.9.tar.gz http://ftpmain.gnustep.org/pub/gnustep/core/gnustep-gui-0.25.0.tar.gz http://ftpmain.gnustep.org/pub/gnustep/core/gnustep-back-0.25.0.tar.gz gcc -lgnustep-base -lobjc main.m -o main -L /usr/GNUstep/Local/Library/Libraries -I /usr/GNUstep/System/Library/Headers/ -fconstant-string-class=NSConstantString */ #import #import #import @interface Hello:NSObject - (void)greet:(char *)msg msg2:(NSString *)msg2; @end @implementation Hello - (void)greet:(char *)msg msg2:(NSString *)msg2 { printf("Hello, World! %s %s \n", msg, [msg2 cString] ); NSLog(@"Hello, World! %s %@", msg , msg2 ); } @end int main(void) { NSString *str1 = @"ijk"; id myhello = [ [Hello alloc] init]; [ myhello greet:"GNUStep ..." msg2:str1 ]; [ myhello release ]; return EXIT_SUCCESS; } }}} == Installation using source code == {{{#!highlight bash cd /tmp wget http://ftpmain.gnustep.org/pub/gnustep/core/gnustep-make-2.6.8.tar.gz wget http://ftpmain.gnustep.org/pub/gnustep/core/gnustep-base-1.24.9.tar.gz wget http://ftpmain.gnustep.org/pub/gnustep/core/gnustep-gui-0.25.0.tar.gz wget http://ftpmain.gnustep.org/pub/gnustep/core/gnustep-back-0.25.0.tar.gz su tar xvzf gnustep-make-2.6.8.tar.gz cd gnustep-make-2.6.8 ./configure make clean make make install ldconfig cd /tmp tar xvzf gnustep-base-1.24.9.tar.gz cd gnustep-base-1.24.9 ./configure make clean make make install ldconfig cd /tmp tar xvzf gnustep-gui-0.25.0.tar.gz cd gnustep-gui-0.25.0 ./configure make clean make make install ldconfig cd /tmp tar xvzf gnustep-back-0.25.0.tar.gz cd gnustep-back-0.25.0 ./configure make clean make make install ldconfig }}}