我試圖寫在win10上與Mingw的C++程序,但我無法運行我的Makefile,現在我嘗試了幾個我們的,我想我理解它的大部分,但它仍然不工作..如何創建一個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-化妝,但所有這說的是Nothing to be Done for 'Makefile.mak'
我嘗試編輯零件是新的,但還是同樣的事情
當然,你的規則動作之前使用TAB? – user0042
是的,我使用notpad ++,所以它告訴我,如果不是 –
您應該考慮使用CMake之類的構建工具包,並讓它處理細節。 – spectras