在windows下,我用gnustep 编译程序。
加上了参数 -I /GNUstep/System/Library/Headers/
fatal error: Foundation.h: 说是找不到这个头、
可是 我去 GNUstep/System/Library/Library/Headers/ 中 有这个文件,
请高手帮忙解决下。谢谢

解决方案 »

  1.   

    比如编译helloworld.m
    gcc -o helloworld helloworld.m -I/GNUstep/System/Library/Headers -fconstant-string-class=NSConstantString -L/GNUstep/System/Library/Libraries -lobjc -lgnustep-base楼主加的参数后的内容是不是少了些什么?-I表示头文件查找的路径,-L表示库文件查找路径,-l表示需要链接的库文件。但是,-fconstant-string-class=NSConstantString  对于这个参数可能比较陌生,这个参数主要是指定常量字符串所使用的class。
      

  2.   

    肯定是头文件路径问题了;
    我写过这种类似的demo的;
    你仔细看看,肯定有个步骤不一样导致的。