【发布时间】:2017-08-20 10:37:37
【问题描述】:
我尝试在 win10 上用 Mingw 编写一个 c++ 程序,但我无法运行我的 Makefile,现在我尝试了一些我们的,我想我理解了大部分,但它仍然无法正常工作..
HashTabelleTest.o: main.o HashTabelle.o
g++ -o HashTabelleTest main.o HashTabelle.o
main.o: main.cpp HashTabelle.cpp
g++ -c main.o main.cpp
HashTabelle.o: HashTabelle.cpp HashTabelle.h
g++ -c HashTabelle.o HashTabelle.cpp HashTabelle.h
clear:
rm *.o *.exe
作为管理员,我使用 mingw32-make 但它所说的只是Nothing to be Done for 'Makefile.mak'
我尝试将零件编辑为新的,但仍然是相同的东西
【问题讨论】:
-
您确定在规则操作之前使用了 TAB?
-
是的,我使用 notpad++ 所以它会告诉我如果不是
-
您应该考虑使用诸如 CMake 之类的构建工具套件并让它处理细节。
-
如何调用Make(即使用什么命令)?这个makefile有几个错误,但是没有提到
Makefile.mak,所以我怀疑这不是你使用的makefile。 -
我使用 C:\Users\lp_ontour\Desktop\Cpp>mingw32-make Makefile.mak