Make Files: No rule to make target
Sorry about this, the file had gone walk abouts. I can't believe I have just done this!
But I have a new problem... My project compiles
but when I type executable in the terminal it doesn't run I just get
bash: executable: command not found
Hello, I am struggling with make files I really don't understand what is wrong with mine.
I have 4 files: main.cpp stringTokeniser.hpp Command.hpp Program.hpp
main.cpp include Program.hpp
and Program.hpp includes Command.hpp and strinbgTokeniser.hpp
My make file is as follows but I receive this error:
make: *** No rule to make target `stringTokeniser.hpp', needed by `Program.o'. Stop.
Code:
CC = g++
executable: main.o
$(CC) main.o -o executable
main.o: main.cpp Program.o
$(CC) -c main.cpp
Program.o: Program.hpp stringTokeniser.hpp Command.hpp
$(CC) -c Program.hpp
I haave also tried
Code:
CC = g++
executable: main.o
$(CC) main.o -o executable
main.o: main.cpp Program.o Program.hpp stringTokeniser.hpp Command.hpp
$(CC) -c main.cpp
gives this error: make: *** No rule to make target `stringTokeniser.hpp', needed by `main.o'. Stop.
Can anyone help me along the right path? thanks
Re: Make Files: No rule to make target
Re: Make Files: No rule to make target
Is the spelling of stringTokeniser.hpp correct? Is the casing correct?