X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Message-ID: <409CD5FA.88189AB1@yahoo.com> From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: DJPGG and Windows XP Professional + I think a Undefined Reference or linker problem 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> <409cbb68_1 AT mk-nntp-2 DOT news DOT uk DOT tiscali DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 52 Date: Sat, 08 May 2004 15:15:58 GMT NNTP-Posting-Host: 12.76.144.142 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1084029358 12.76.144.142 (Sat, 08 May 2004 15:15:58 GMT) NNTP-Posting-Date: Sat, 08 May 2004 15:15:58 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com wordsworth wrote: > "Tom" wrote in message >> 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.) > > 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. Please don't top-post, it makes the posts incomprehensible. I fixed this one. Isn't there some fundamental misunderstanding going on here? gpp is the preprocessor. g++ is the C++ linking compiler. gxx is used under djgpp to replace g++ because the '+' is not valid in a DOS file name. If you don't link to a final executable you can use either gcc or gxx. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net) Available for consulting/temporary embedded and systems. USE worldnet address!