无法使用 GNUstep 在 Objective-C 上构建程序
我正在尝试在 Linux (Ubuntu) 上的 Objective-C 上构建 hello world。 main.c
#import <Foundation/Foundation.h>
int main(void)
{
NSLog(@"asdasd");
return 0;
}
我认为这里没有错误。然后我创建了 Makefile:
GNUSTEP_MAKEFILES = /usr/share/GNUstep/Makefiles
include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = main
main_OBJC_FILES = main.m
include $(GNUSTEP_MAKEFILES)/tool.make
然后我运行“make”:
This is gnustep-make 2.2.0. Type 'make print-gnustep-make-help' for help.
Making all for tool main...
make[1]: GNUmakefile: no such file or directory
我该如何修复它?
I'm trying to build hello world on Objective-C on Linux (Ubuntu).
main.c
#import <Foundation/Foundation.h>
int main(void)
{
NSLog(@"asdasd");
return 0;
}
I don't think there is the error here. Then i'd created Makefile:
GNUSTEP_MAKEFILES = /usr/share/GNUstep/Makefiles
include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = main
main_OBJC_FILES = main.m
include $(GNUSTEP_MAKEFILES)/tool.make
And then i run "make":
This is gnustep-make 2.2.0. Type 'make print-gnustep-make-help' for help.
Making all for tool main...
make[1]: GNUmakefile: no such file or directory
How can i fix it ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Ubuntu 系统上安装 GNUstep 库和工具很简单,只需 sudo apt-get install gnustep gnustep-devel 就可以了(说真的,据我所知,Apt 是安装软件的最简单方法 - 只要因为它在存储库中)。
结果我将其命名为
GNUMakefile
,而我应该将其命名为GNUmakefile
。source.m:
GNUmakefile:
我可以运行它。
Installing the GNUstep libraries and tools on an Ubuntu system is simple, just sudo apt-get install gnustep gnustep-devel and you're all set (seriously, Apt is, as far as I know, the easiest way to install software - as long as it's in the repositories).
Turns out I had named it
GNUMakefile
, while I should have named itGNUmakefile
.source.m:
GNUmakefile:
And I can run it.