fedora19 설치objected-c 환경

1144 단어
yum install gnustep*.x86_64
  GNUSTEP_MAKEFILES=/usr/lib64/GNUstep/Makefiles   export GNUSTEP_MAKEFILES
#import <Foundation/Foundation.h>

int main(int argc, char * argv[]){
    NSLog(@"Hello world!
"); return 0; }
 gcc `gnustep-config --objc-flags` -L/lib64/libobjc.so.4   -lgnustep-base  hello.m -o hello
/usr/bin/ld:/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libgnustep-base.so: undefined reference to symbol 'objc_msg_lookup'
/usr/bin/ld: note: 'objc_msg_lookup' is defined in DSO/lib64/libobjc.so.4 so try adding it to the linker command line
/lib64/libobjc.so.4:could not read symbols: 잘못된 작업
collect2: 오류:ld 반환 1
--------------------------------------------------------------------------------------------------------------------------
$gcc hello.m `gnustep-config --objc-flags` -lobjc -lgnustep-base -o hello $ ./hello 2013-11-18 22:16:42.869 hello[8531] Hello,world!
참조:
http://stackoverflow.com/questions/13446450/simple-hello-world-in-objective-c-with-clang-and-gnustep-does-not-compile

좋은 웹페이지 즐겨찾기