From: Nate Eldredge Newsgroups: comp.os.msdos.djgpp Subject: Re: Makefile for C++ Date: 17 Oct 2000 14:45:53 -0700 Organization: InterWorld Communications Lines: 33 Sender: nate AT mercury DOT st DOT hmc DOT edu Message-ID: <83pukz3zvy.fsf@mercury.st.hmc.edu> References: <8sifui$2iu$1 AT venus DOT telepac DOT pt> NNTP-Posting-Host: mercury.st.hmc.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: nntp1.interworld.net 971819153 60456 134.173.57.219 (17 Oct 2000 21:45:53 GMT) X-Complaints-To: usenet AT news DOT interworld DOT net NNTP-Posting-Date: Tue, 17 Oct 2000 21:45:53 +0000 (UTC) User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Paulo J. Matos aka PDestroy" writes: > Hi, > I have a C++ which I want to compile using a makefile. > I have the following program: [snip] > And the following makefile: > > OBJECTS = banco.o > TARGET = banco.exe > SOURCES = banco.cpp > > banco.exe: $(OBJECT) > gcc -g -o $(TARGET) $(OBJECT) -lstdcxx > > banco.o: $(SOURCES) > gcc -g -c -O $(SOURCES) > > clear: > del *.o > del *.exe 1. You have OBJECTS and OBJECT different, which doesn't seem to be what you want. 2. All the lines that specify commands (like `gcc' or `del') must start with a TAB character. Your email has spaces, which won't work. This is in the FAQ. -- Nate Eldredge neldredge AT hmc DOT edu