|
-
March 14th, 2007, 10:20 AM
#1
makefile for linux help needed.. any makefile people here? :)
Hello,
I made a library in Linux with a .h file test.h. So I have libtest.a which has a test.h file in it.
I made a new makefile for a program I have:
stupidprogram: $(OBJECTS)
g++ -dy -o -l. -Ltest stupidprogram $(OBJECTS) $(LDLIBS)
but when I try to make, I get an error indicating the .h file is missing?? ANy idea why it cant see it???
Thanks!
-
March 14th, 2007, 10:40 AM
#2
Re: makefile for linux help needed.. any makefile people here? :)
I switched to:
stupidprogram: $(OBJECTS)
g++ -dy -o -L. -ltest stupidprogram $(OBJECTS) $(LDLIBS)
but still doesnt work.. anyone help???
-
March 14th, 2007, 05:30 PM
#3
Re: makefile for linux help needed.. any makefile people here? :)
lab1,
What is the actual error? Is it an error from g++ or from GNU make?
Where is the header located with respect to the C++ file? Are you sure that the include file is in your include path?
Remember to fully specify your include path for g++ using the -I compiler directive.
Give a bit of feedback please.
Sincerely, Chris.
You're gonna go blind staring into that box all day.
-
March 15th, 2007, 12:19 PM
#4
Re: makefile for linux help needed.. any makefile people here? :)
Do you have a tab character in front of the 'g++' line?
Viggy
-
March 15th, 2007, 01:10 PM
#5
Re: makefile for linux help needed.. any makefile people here? :)
Does the missing file error come from make or g++? If from make, then you have a rule somewhere that defines that header as a requisite for compiling the source file.
Code:
mysource.c: mysource.h other.h etc.h
Otherwise, it could be as simple as the include path being wrong; -I parameter and not a make rule error.
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
|