From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: djgpp doesn't compile right Date: Tue, 07 Jan 1997 20:26:23 -0800 Organization: Two pounds of chaos and a pinch of salt Lines: 27 Message-ID: <32D321EF.481F@cs.com> References: <01bbfb1f$50d1b820$51412299 AT ttt> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp108.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp George Xu wrote: > > c:/djgpp/tmp\ccdaaaaa(.text+0x1a):ex1.cc: undefined referenced to > 'endl(ostream &)' > c:/djgpp/tmp\ccdaaaaa(.text+0x24):ex1.cc: undefined referenced to 'cout' > c:/djgpp/tmp\ccdaaaaa(.text+0x29):ex1.cc: undefined referenced to > 'ostream::operator<<(char const *) ' Did you actually read 'readme.1st' all the way through? To compile C++ programs, you must link in the C++ libraries! You can either link the libraries manually by calling gcc with the '-l' directive, or use the 'gxx' program which does this for you: gcc -Wall -O -g -o test.exe test.cc -liostream -lgpp -lstdcx - or - gxx -Wall -O -g -o test.exe test.cc Not all of the above libraries are necessary; it depends on what your program uses. -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com | | Plan: To find ANYONE willing to | http://www.cs.com/fighteer | | play Descent 2 on DWANGO! | Tagline: | ---------------------------------------------------------------------