Xref: news2.mv.net comp.os.msdos.djgpp:2043 From: nicolas AT dsys DOT ceng DOT cea DOT fr (Eric NICOLAS) Newsgroups: comp.os.msdos.djgpp Subject: Re: Q: C++ compilation Date: 19 Mar 1996 11:25:15 GMT Organization: Commissariat a l'energie atomique Lines: 25 Message-ID: <4im5ir$sko@news.cea.fr> References: <4im2ud$jui AT newsbf02 DOT news DOT aol DOT com> Reply-To: nicolas AT dsys DOT ceng DOT cea DOT fr NNTP-Posting-Host: hudson.ceng.cea.fr To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article <4im2ud$jui AT newsbf02 DOT news DOT aol DOT com>, mt31415 AT aol DOT com (Mt31415) writes: >>>syntax: gcc test.cc > >>>Is that correct? Here are the errors djgpp v2.0 printed out: > >>>test.cc(.text+0x1e): undefined reference to `cout' >>>test.cc(.text+0x23): undefined reference to `ostream::operator<<(char >const *)' > > >Try using `gxx' instead of `gcc'. Noooo ! The problem is that cout, ostream... are defined in the C++ library. So you must include this library at link time : gcc test.cc -lgpp Hope it helps. -- Eric Nicolas