【发布时间】:2011-12-19 09:05:00
【问题描述】:
我正在通过一个例如 pgm 来创建一个 make 文件。
http://mrbook.org/tutorials/make/
我的文件夹 eg_make_creation 包含以下文件,
desktop:~/eg_make_creation$ ls
factorial.c functions.h hello hello.c main.c Makefile
生成文件
all:gcc -c main.c hello.c factorial.c -o hello
错误:
desktop:~/eg_make_creation$ make all
make: *** No rule to make target `gcc', needed by `all'. Stop.
请帮我理解编译这个程序。
【问题讨论】:
-
请再次仔细阅读链接的文档,其中关于格式化 Makefile 的内容;空白字符(尤其是换行符和制表符)很重要,不能简单地省略
-
all:不是命令行...