delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
Message-ID: | <409CD5FA.88189AB1@yahoo.com> |
From: | CBFalconer <cbfalconer AT yahoo DOT com> |
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> <c7fdq0$9c3$1 AT antares DOT lu DOT erisoft DOT se> <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> |
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" <Thomas8675309 AT yahoo DOT com> wrote in message >> Martin Stromberg wrote: >>> wordsworth <news AT callera DOT net> 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. <http://cbfalconer.home.att.net> USE worldnet address!
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |