0

Hi I've been trying to compile my code using a makefile but it keeps giving me the missing *** separator. Stop error. I made sure that after every line where I do a command I press tab. I'm not sure where I'm going wrong here.

output: main.o funcs.o
  g++ main.o -o main.o funcs.o -o output
  
main.o: main.cpp
  g++ -c main.cpp

funcs.o: funcs.cpp classes.hpp
  g++ -c funcs.cpp

clean:
  rm *.o output
CS_12319
  • 1
  • 1
  • 2
    are you sure you have tabs not spaces? Certainly the code you have posted here has spaces, I recommend using an editor with a visible whitespace option – Alan Birtles Dec 10 '20 at 08:10
  • Try opening it in an editor that turns on visible whitespace, which should make any whitespace problems obvious. – Omada Dec 10 '20 at 08:12
  • Try to erase all but a pair of lines e.g. lines 1 and 2, or lines 4 and 5, and see if the problem persists. – user31264 Dec 10 '20 at 08:12
  • Yeah thanks for the advice. My text editor when I pressed tab was not actually giving me a tab – CS_12319 Dec 10 '20 at 08:37

0 Answers0