|
-
April 29th, 2008, 04:25 PM
#1
A simple question about writing a Makefile
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
-
April 29th, 2008, 05:42 PM
#2
Re: A simple question about writing a Makefile
Define "doesn't work".
Viggy
-
April 30th, 2008, 05:59 AM
#3
Re: A simple question about writing a Makefile
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
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
|