Xref: news2.mv.net comp.os.msdos.djgpp:1159 From: Leon Heller Newsgroups: comp.os.msdos.djgpp Subject: Re: djgpp and the use of cout Date: Thu, 15 Feb 96 20:39:54 GMT Organization: Home Lines: 40 Message-ID: <824416794snz@lfheller.demon.co.uk> References: <312256D9 DOT C42 AT nlthcl DOT bcs DOT cs DOT philips DOT com> Reply-To: Leon AT lfheller DOT demon DOT co DOT uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article <312256D9 DOT C42 AT nlthcl DOT bcs DOT cs DOT philips DOT com> tms_hennuin AT nlthcl DOT bcs DOT cs DOT philips DOT com "Henk Hennuin" writes: > > This is probably a newby question but I couldn't find the answer in > the FAQ. > > Last week I downloaded EZ-GCC this is DJGPP v1.12m4 for > easy installation and minimum diskspace. > > I have installed the 3 disk set onto my computer and tried > my first little C++ program. So far so good. > > Now my problem: > > I have trouble with the cout iostream function. Everything seems to > work allright but just this one thing doesn't. > > The compiler doesn't complain. The linker gives these errors: > > test.cc(.text+0xa5): undefined reference to `endl(ostream &)' > test.cc(.text+0xaa): undefined reference to `cout' > test.cc(.text+0xaf): undefined reference to `ostream::operator<<(ostream > &(*)(ostream &))' > > The last error message I managed to get rid of by using the -O flag > with gcc. This tip I go from the FAQ, it has got something to do with > optimalisation and inline code. > > Does anybody know how I can solve the other two? I had a similar problem when I started using the DJGPP compiler. I found that I needed to link in the libgpl library with -lgpl. Leon -- Leon Heller, G1HSM | "Do not adjust your mind, there is E-mail leon AT lfheller DOT demon DOT co DOT uk | a fault in reality": on a wall Phone: +44 (0)1734 471424 | many years ago in Oxford.