使用 GNUstep 编译 Objective-C
我是 Objective-C 的新手。我正在尝试使用 GNUstep 编译 Objective-C,但出现错误。我尝试在命令行(gcc 和 makefile)上进行编译。
No such file or directory /
excepted '>' before 'GSPredicateBlock'
…
我使用了命令行
gcc gnustep-config --objc-flags -o hello hello.m -I /GNUstep/System/Library/Headers -L /GNUstep/System/Library/Libraries -lobjc -lgnustep-base -fconstant-string-class=NSConstantString -enable-auto-import
我尝试使用makefile:
Making all for tool Hello...
Compiling file hello.m ...
hello.m:1:71 fatal error: ../../GNUstep/System/Library/Headers/Foundation/Found ation.h: No such file or directory
compilation terminated.
make[3]: *** [obj/Hello.obj/hello.m.o] Error 1
make[2]: *** [internal-tool-all_] Error 2
make[1]: *** [Hello.all.tool.variables] Error 2
make: *** [internal-all] Error 2
我搜索了Google,但找不到任何有帮助的东西。我安装了 gnustep-msys-system-0.28.0-setup
、gnustep-core-0.28.0-setup
和 gnustep-devel-1.3.0-setup在 Windows 7 上。
I'm a newbie in Objective-C. I'm trying to compile Objective-C with GNUstep but it's giving errors. I tried to both compile on command line (gcc and makefile).
No such file or directory /
excepted '>' before 'GSPredicateBlock'
…
I used the command line
gcc gnustep-config --objc-flags -o hello hello.m -I /GNUstep/System/Library/Headers -L /GNUstep/System/Library/Libraries -lobjc -lgnustep-base -fconstant-string-class=NSConstantString -enable-auto-import
My attempt at using a makefile:
Making all for tool Hello...
Compiling file hello.m ...
hello.m:1:71 fatal error: ../../GNUstep/System/Library/Headers/Foundation/Found ation.h: No such file or directory
compilation terminated.
make[3]: *** [obj/Hello.obj/hello.m.o] Error 1
make[2]: *** [internal-tool-all_] Error 2
make[1]: *** [Hello.all.tool.variables] Error 2
make: *** [internal-all] Error 2
I've searched Google, but I can't find anything that helps. I installed gnustep-msys-system-0.28.0-setup
, gnustep-core-0.28.0-setup
and gnustep-devel-1.3.0-setup
on Windows 7.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道这是否是一个红鲱鱼,但我看到在不应该出现的地方有一个空格:
它应该在源代码文件中读取:(
没有空格)
显然这是编译器在这里抱怨的:
删除源代码文件的导入指令中的空格,然后重试。
I don't know if this is a red herring but I see there's a space in a place where it should not be:
it should read:
(without the space) in your source code file
Obviously this is what the compiler complains about here:
remove that space in your source code file's import directive and try again.