X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "wordsworth" Newsgroups: comp.os.msdos.djgpp References: <409a7633_1 AT mk-nntp-2 DOT news DOT uk DOT tiscali DOT com> <7b68d58f DOT 0405070609 DOT e22b8c1 AT posting DOT google DOT com> Subject: Re: DJPGG and Windows XP Professional + I think a Undefined Reference or linker problem Date: Sat, 8 May 2004 11:50:13 +0100 Lines: 42 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Message-ID: <409cbb68_1@mk-nntp-2.news.uk.tiscali.com> X-Original-NNTP-Posting-Host: 62.64.209.68 NNTP-Posting-Host: mk-nntp-2.news.uk.tiscali.com X-Trace: 8 May 2004 11:51:08 +0100, mk-nntp-2.news.uk.tiscali.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Thanks Tom and Martin, Thats almost cleared up this for me. Thank you both for your explaination (very helpful); question? The C++ standard library is linked by default with gpp. How does this manifest itself - I dont mean where is the C++ library, but rather how is it linked? Is it compiled into a binary or can I define its location (add config switches) in a config file? Basically I should think that the linker error can be amended. I want to avoid having to add extra suff to the compiler line when excuting cmd line compiles e.g. gpp test.cc -o test.exe. Regards, "Tom" wrote in message news:7b68d58f DOT 0405070609 DOT e22b8c1 AT posting DOT google DOT com... > Martin Stromberg wrote: > > > wordsworth wrote: > > > : I have now tried gpp that compiles my prog. So what is the difference > > : between gcc and gpp > > > > gpp is the C++ compiler and gcc is the C compiler. > > gcc calls either the C compiler or the C++ compiler (or other > programs) depending upon the file suffix of the file provided on the > command line. gpp is the same as gcc (I believe) but links in the C++ > standard library by default, while gcc requires that the library be > expressly listed on the command line to link it in. So using gcc on a > C++ source file will call the C++ compiler but fail to link in the C++ > standard library unless you explicitly tell gcc to do so. Which is > why using gcc on C++ source files can lead to linker errors. > > (And yes, I recognize that Martin knows the difference and was > simplifying to make it easier for new users.) > > Best regards, > > Tom