0

When trying to run the command make, I am getting the error: makefile:22: *** missing separator. Stop. Line 22 would be the line just before g++ driver.o ground.o... I know I need to use tabs, instead of spaces, but it still does not work. Any idea? This is my code:

LFLAGS = -lglut -lGLU -lGL

a.out:  driver.o ground.o game.o uiInteract.o uiDraw.o point.o lander.o velocity.o 
 g++ driver.o ground.o game.o uiInteract.o uiDraw.o point.o lander.o velocity.o $(LFLAGS)
 tar -j -cf moonLander.tar makefile *.h *.cpp

uiDraw.o: uiDraw.cpp uiDraw.h
 g++ -c uiDraw.cpp

uiInteract.o: uiInteract.cpp uiInteract.h
 g++ -c uiInteract.cpp

point.o: point.cpp point.h
 g++ -c point.cpp

ground.o: ground.cpp ground.h
 g++ -c ground.cpp

game.o: game.h game.cpp uiDraw.h uiInteract.h point.h ground.h
 g++ -c game.cpp

driver.o: driver.cpp game.h uiInteract.h
 g++ -c driver.cpp

lander.o: lander.cpp lander.h point.h velocity.h uiDraw.h
 g++ -c: lander.cpp

velocity.o: velocity.cpp velocity.h
 g++ -c: velocity.cpp

clean:
 rm a.out *.o *.tar
nobody
  • 19,421
  • 17
  • 55
  • 76

1 Answers1

1

I can't comment yet, but this appears to be a duplicate of Errors in make file : *** missing separator. Stop
Depending on the editor you are using (and how you've configured that editor), your tabs might be getting replaced with spaces (i.e, when you hit the tab key, it inputs 4 spaces instead).
Either change your editor to use tab characters instead of spaces, or use another editor that is set up that way.

CyanBlob
  • 64
  • 2
  • 6