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!
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???
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.
Re: makefile for linux help needed.. any makefile people here? :)
Do you have a tab character in front of the 'g++' line?
Viggy
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.