-
December 16th, 2009, 08:10 PM
#1
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
Last edited by emdiesse; December 16th, 2009 at 08:37 PM.
-
December 17th, 2009, 02:16 AM
#2
Re: Make Files: No rule to make target
-
December 17th, 2009, 08:25 AM
#3
Re: Make Files: No rule to make target
Is the spelling of stringTokeniser.hpp correct? Is the casing correct?
Succinct is verbose for terse
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|