From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Unable link String class Date: Mon, 23 Mar 1998 20:42:19 -0500 Organization: Two pounds of chaos and a pinch of salt. Lines: 28 Message-ID: <35170F7B.38C1@cs.com> References: <199803231218 DOT NAA17727 AT post DOT globe DOT cz> NNTP-Posting-Host: ppp239.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 Precedence: bulk dstegbauer AT post DOT cz wrote: > > and here are linker messages (after "gcc -o test.exe -lgpp -lstdcxx test.o"): Try adding the libraries after the source and object files. ld is a one-pass linker, meaning that if it sees a library before it sees any object files, it won't know that your program needs the functions in the libraries until after it's read and discarded them. The following command line will work: gcc -o test.exe test.o -lgpp -lstdcxx Alternatively: gxx -o test.exe test.o (gcc 2.7.2.1 or previous) gpp -o test.exe test.o (gcc 2.8.0 or later) This exact problem is discussed in chapter 8.9 of the DJGPP FAQ. hth! -- --------------------------------------------------------------------- | John M. Aldrich | "Democracy is based on the assumption| | aka Fighteer I | that a million men are wiser than one| | mailto:fighteer AT cs DOT com | man. How's that again? I missed | | http://www.cs.com/fighteer | something." - Lazarus Long | ---------------------------------------------------------------------