Makefile:18:***缺少分隔符。停止[关闭]

问题描述 投票:-2回答:1

如果我删除干净的部分,程序运行正常。如何修理清洁剂使其起作用?

a.out: Airplane.o Fruit.o Automobile.o Garage.o la3.o Vehicle.o Truck.o 
    g++ Airplane.o Fruit.o Automobile.o Garage.o la3.o Vehicle.o Truck.o
Fruit.o: Fruit.cpp Fruit.hpp
    g++ -c Fruit.cpp
Vehicle.o: Vehicle.cpp Vehicle.hpp
    g++ -c Vehicle.cpp
Automobile.o: Automobile.cpp Automobile.hpp
    g++ -c Automobile.cpp
Truck.o: Truck.cpp Truck.hpp
    g++ -c Truck.cpp
Airplane.o: Airplane.cpp Airplane.hpp
    g++ -c Airplane.cpp
Garage.o: Garage.cpp Garage.hpp
    g++ -c Garage.cpp
la3.o: la3.cpp Garage.hpp
    g++ -c la3.cpp

enter image description here

c++ makefile computer-science
1个回答
0
投票

用rm -f * .o测试在干净的行中,删除所有.o并更改为* .oa.o b.o c.o == * .o

© www.soinside.com 2019 - 2024. All rights reserved.