From: Olaf Nimz Newsgroups: comp.os.msdos.djgpp Subject: linker problem Date: Tue, 27 Oct 1998 17:30:59 +0100 Organization: Freie Universitaet Berlin Lines: 48 Message-ID: <3635F542.41C6@chemie.fu-berlin.de> NNTP-Posting-Host: hodgkin.chemie.fu-berlin.de (160.45.25.14) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Access: 16 17 19 X-Trace: fu-berlin.de 909505859 14551 (none) 160.45.25.14 X-Mailer: Mozilla 3.01 (X11; I; IRIX 6.2 IP22) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com hello everybody, could somebody be so kind to explain me why this happen with an gcc compiler and what i'm doing wrong. It makes no difference if i first compile question.cpp to question.o and use gxx -o a.out tmp.cpp question.o instead. same problem occur if using gcc under unix but with CC of silicon graphics compilation ends successful. ciao olaf file tmp.cpp: #include "question.h" void main(){ question(); } file question.h: int question(void); file question.cpp: #include #include "question.h" int question(void){ cout << "everything seems to be ok!" << endl; return(0); } command line: gxx -o a.out question.cpp tmp.cpp error: collect2: ld returned 1 exit status /bin/../lib/ld: Unresolved: cout ostream::operator<<(char const *) endl(ostream &) ostream::operator<<(ostream &(*)(ostream &))