I have main.cc and test.h files,
main.cc includes test.h
Here is the Makefile, but it doesn't work. any clue?
Code:main : main.o
g++ -g main.o -o main
main.o : main.cc test.h
g++ -o main.o -c -g test.h main.cc
Printable View
I have main.cc and test.h files,
main.cc includes test.h
Here is the Makefile, but it doesn't work. any clue?
Code:main : main.o
g++ -g main.o -o main
main.o : main.cc test.h
g++ -o main.o -c -g test.h main.cc
Define "doesn't work".
Viggy
A common mistake is the use of spaces instead of a tab character at the beginning of a command line. I don't know if this is the case, here.
See http://www.gnu.org/software/make/manual/make.html