Date: Sat, 04 Nov 2000 18:30:49 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Paulo J. Matos aka PDestroy" Message-Id: <2561-Sat04Nov2000183048+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.5h CC: djgpp AT delorie DOT com In-reply-to: <8u13u0$7bo$1@venus.telepac.pt> (pdestroy@netcabo.pt) Subject: Re: No rule to make file? References: <8u13u0$7bo$1 AT venus DOT telepac DOT pt> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Paulo J. Matos aka PDestroy" > Newsgroups: comp.os.msdos.djgpp > Date: Sat, 4 Nov 2000 13:44:57 -0000 > > One of the classes I have is a C++ template so the extension is lists.hpp > and the header is lists.h. > I have a makefile like the following: > ----------------- > COBJS = x.o y.o z.o h.o p.o lists.o main.o > PROGS = b.exe > FLAGS = -g -Wall > CC = gpp > > all: $(PROGS) > > banco.exe: $(COBJS) > $(CC) $(FLAGS) -o $(PROGS) $(COBJS) > > clear: > rm -f *.o > rm -f $(PROGS) > > depend: > makedepend *.cpp > ----------- > When I try to compile the project doing make I get a problem that says: > make.exe: *** No rule to make target `lists.o', needed by `b.exe'. Stop. Make doesn't automatically know that lists.o can be built by compiling lists.hpp. You need to add a rule for compiling lists.hpp into lists.o. Alternatively, rename lists.hpp into lists.cpp, since *.hpp files are not meant to be compiled into object files. Also, make sure you have the latest version 3.79.1 of GNU Make, as older versions might not know about *.cpp files.