![]() |
#2
weble2010-08-18 23:11
|

cpp_file = computer.cpp person.cpp test_driver.cpp
exe_file = computer.exe
$(exe_file) : computer.h person.h $(cpp_file)
g++ $(cpp_file) -o $(exe_file)
clean:
-rm $(exe_file)
这是一个简单的makefile文件。make是没有问题的,但是我用make clean清理生成的可执行文件的时候却出问题了。exe_file = computer.exe
$(exe_file) : computer.h person.h $(cpp_file)
g++ $(cpp_file) -o $(exe_file)
clean:
-rm $(exe_file)
报错如下:
rm computer.exe
process_begin:CreateProcess((null), rm computer.exe, ...) failed.
make (e=2):系统找不到指定的文件。
make: [clean] Error 2 (ignored)
谢谢大家了~~~
