1

I am making a project in C++ and am using a makefile to compile and run the program. Everything compiles properly and upon the make run command, the program executes as expected without issue. However, I get an error that says

make: *** [run] Error 1

I don't get any error when I run the program without using the make run command so I'm not sure what this error means. Here is my makefile:

OBJECTS = CS315_A5.o functions.o
HEADERS = functions.h

MARKOV: $(OBJECTS)
    g++ $^ -o $@

%.o: %.cpp $(HEADERS)
    g++ -c -g -Wall $< -o $@

run:
    ./MARKOV data.markov.txt

clean:
    rm -f $(OBJECTS) MARKOV
jdmo242
  • 71
  • 1
  • 7

1 Answers1

2

It means that the MARKOV executable is returning with an exit code of 1, i.e.

return 1;

See this post for more information: make: *** [ ] Error 1 error

lehiester
  • 836
  • 2
  • 7
  • 17