X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Trace-PostClient-IP: 68.147.131.211 From: Brian Inglis Newsgroups: comp.os.msdos.djgpp Subject: Re: DJPGG and Windows XP Professional + I think a Undefined Reference or linker problem Organization: Systematic Software Message-ID: 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> <409CD5FA DOT 88189AB1 AT yahoo DOT com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 56 Date: Sat, 08 May 2004 16:22:11 GMT NNTP-Posting-Host: 24.71.223.147 X-Complaints-To: abuse AT shaw DOT ca X-Trace: pd7tw1no 1084033331 24.71.223.147 (Sat, 08 May 2004 10:22:11 MDT) NNTP-Posting-Date: Sat, 08 May 2004 10:22:11 MDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com fn Sat, 08 May 2004 15:15:58 GMT in comp.os.msdos.djgpp, CBFalconer wrote: >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. Recent versions of GCC use cpp instead of gpp and gpp instead of gxx. -- Thanks. Take care, Brian Inglis Calgary, Alberta, Canada Brian DOT Inglis AT CSi DOT com (Brian dot Inglis at SystematicSw dot ab dot ca) fake address use address above to reply