| delorie.com/archives/browse.cgi | search |
| From: | "Paulo J. Matos aka PDestroy" <pdestroy AT netcabo DOT pt> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Makefile for C++ |
| Date: | Tue, 17 Oct 2000 22:22:01 +0100 |
| Lines: | 60 |
| Message-ID: | <8sifui$2iu$1@venus.telepac.pt> |
| NNTP-Posting-Host: | 212.113.180.252 |
| X-Trace: | venus.telepac.pt 971817746 2654 212.113.180.252 (17 Oct 2000 21:22:26 GMT) |
| X-Complaints-To: | abuse AT mail DOT telepac DOT pt |
| NNTP-Posting-Date: | 17 Oct 2000 21:22:26 GMT |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Newsreader: | Microsoft Outlook Express 5.50.4133.2400 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Hi,
I have a C++ which I want to compile using a makefile.
I have the following program:
#include <iostream>
int main() // Cria menu e recebe a escolha do utilizador
{
int option;
// As próximas linhas (7) imprimem o menu no ecrãn
cout << "\nContas bancarias"
<< "\n----------------"
<< "\n"
<< "\n\t1) Criar Conta a Ordem"
<< "\n\t2) Sair"
<< "\n"
<< "\n\t\t-- Qual a sua opcao? ";
//A proxima linha recebe input do utilizador
cin >> option;
cout << "\nOpcao foi: " << option;
return 1;
}
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
Why is this makefile not working? (since the program is correct and if I
compile it 'by hand' It works)
Best regards,
--
Paulo J. Matos aka PDestroy
http://www.pdestroy.net
ICQ UIN - 361853
--
The price of greatness is responsibility
- Churchill, W.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |