生成文件错误 "*** No target specified and no makefile found.stop."

标签 makefile mingw

我有一个包含这段代码的 makefile

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.

最佳答案

您可以通过两种方式解决这个问题。

  1. 正如评论者所说,将您的文件从 makefile.txt 重命名为 makefile
  2. 另一种方法,使用 mingw32-make -f makefile.txt

关于生成文件错误 "*** No target specified and no makefile found.stop.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28943942/

相关文章:

c++ - 如何解决 *** 缺少分隔符。编译QT(或支持库)时?

c++ - 将我的 DDiscMaster2Events 连接/链接到什么以进行驱动器更改事件。微软 COM 对象

c++ - 在eclipse中构建cpp项目的问题

c++ - 如何在 Clion 中链接 ws2_32

c++ - Hello world 程序在 gtkmm 中崩溃

c - 了解 map 文件,优化大小

python - OpenCV 从源 Windows 生成错误 "RC Object"

无法使用Windows 7命令提示符和MinGW编译C程序

makefile - 在每个子目录(子 make)中的 Makefile.am 上使用相同的 CFLAGS

makefile - 如何在 Makefile 中使用自动变量获取第二个依赖文件?