I am trying to run a makefile to execute my code, but it returns this error:
make: *** [makefile:8: run] Error 127
Makefile code:
main: *.o
g++ -o main *.cpp
*.o: *.h *.cpp
g++ -g -c *.cpp
run:
./main
clean:
rm ./*.o main
I am trying to run a makefile to execute my code, but it returns this error:
make: *** [makefile:8: run] Error 127
Makefile code:
main: *.o
g++ -o main *.cpp
*.o: *.h *.cpp
g++ -g -c *.cpp
run:
./main
clean:
rm ./*.o main
I believe the problem is that Makefile doesn't like your asterisks. I would recommend leveraging matchers '%' instead.
Please see: How to properly use % or * (asterisk) symbols as a placeholder in makefile?