【发布时间】:2015-03-09 14:05:31
【问题描述】:
我有一个包含此代码的生成文件
all: hello.exe
hello.exe: hello.o
gcc -o hello.exe hello.o
hello.o: hello.c
gcc -c hello.c
clean:
rm hello.o hello.exe
当我写这个命令时
mingh32-make
我知道了:
mingw32-make : *** No targets specified and no makefile found. Stop.
【问题讨论】:
-
您的 makefile 是命名为
Makefile还是makefile?它是否在您运行mingw32-make的同一目录中? -
我的makefile名称是makefile,它也在我运行mingw32-make的同一个目录中
-
这不可能。你确定你在makefile名称上没有某种扩展名吗?如果您输入
dir makefile,它是否会显示有关makefile 的信息?还是说“找不到文件”?然后,如果您在不更改目录的情况下立即运行mingw32-make,您会收到此错误吗?确保名称makefile中的所有字符都不是看起来或多或少相同的特殊字符。 -
makefile 的扩展名是 .txt,在输入 dir makefile 时会显示找不到文件
-
之后我得到了和以前一样的错误。