Как скомпилировать код Objective C в Ubuntu

Я новичок в программировании Iphone. Я пытаюсь скомпилировать (ubuntu ).

#import 

int main (void)
 {
  NSLog (@"Executing");
  return 0;
 }

Я скомпилировал его, но получил следующую ошибку

   subhash@subhash-Lenovo-G570:~/grit/iphone/mac$ gcc -lgnustep-base -lpthread -lob
  jc -lm -I/usr/local/include/GNUstep -I/usr/include/GNUstep -fconstant-string-cla
  ss=NSConstantString hello.m -o hello
  In file included from /usr/include/GNUstep/Foundation/NSClassDescription.h:30:0,
                  from /usr/include/GNUstep/Foundation/Foundation.h:50, 
                  from hello.m:1:
  /usr/include/GNUstep/Foundation/NSException.h:42:2: error: #error The current se
  tting for native-objc-exceptions does not match that of gnustep-base... please 
  correct this.

я следил заhttp://ubuntuforums.org/showthread.php?p=5593608в качестве ссылки.

Я прокомментировал #директиву об ошибке NSException.h, и проблема решена. Теперь я получаю новую ошибку.

/tmp/ccQlI9wJ.o: In function `main':
        hello.m:(.text+0x11): undefined reference to `NSLog'
        /tmp/ccQlI9wJ.o: In function `__objc_gnu_init':
        hello.m:(.text+0x2a): undefined reference to `__objc_exec_class'
        /tmp/ccQlI9wJ.o:(.data+0x40): undefined reference to `__objc_class_name_NSConsta
        ntString'
        collect2: ld returned 1 exit status

5
задан subhash kumar singh 6 July 2012 в 08:56
поделиться