delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/20/07:32:06

From: Scott Billings <aerogemsx AT netins DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: C++ code doesn't compile
Date: Fri, 20 Mar 1998 05:37:57 -0600
Organization: netINS, Inc.
Lines: 45
Message-ID: <35125514.6625294@netins.net>
References: <35119A81 DOT 8D281715 AT netins DOT net> <3511BA5C DOT 5EC9 AT cs DOT com>
NNTP-Posting-Host: desm-16-106.dialup.netins.net
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Not really complaining.... Merely curious.... I've been using Linux's GCC,
and have seen it compile C++ code (like most of KDE), so I just assumed the
DOS version would be the same.

But, the main reason I asked, is I generally use DFE95 as my IDE, and it
tries to compile my source using GCC, and I get all those wonderful error
messages. So, I was wondering if I had once again gotten a bad archive, or
if it was something else (because using a DOS window is a pain if you don't
have to).

> *sigh*.  There's an old story that someone on here once posted.  A man
> goes to the doctor and says, "Doctor, it hurts when I do this."  The
> doctor replies, "Well, don't do that then."  The moral (however dubious)
> applies equally to this situation.
>
> gcc only knows about the C library.  It does not have the slightest idea
> when it gets to the linking stage what language your program was written
> in.  If you study how the compiler operates, this should be obvious.
> Since it makes no sense to link the C++ libraries into a C program, you
> have to specify them manually if you want to use plain 'gcc'.
>
> To make things easier for programmers, the GNU developers wrote a handy
> little wrapper program called 'g++' (called 'gxx' or 'gpp' on MS-DOS)
> that automatically appends the C++ libraries to the command line of
> 'gcc'.  This was done to save effort on your part.
>
> Why are you complaining about this?  :-)
>
> --
> ---------------------------------------------------------------------
> |      John M. Aldrich       | "Autocracy is based on the assumption|
> |       aka Fighteer I       | that one man is wiser than a million |
> |   mailto:fighteer AT cs DOT com   | men.  Let's play that over again,    |
> | http://www.cs.com/fighteer | too.  Who decides?"   - Lazarus Long |
> ---------------------------------------------------------------------



--
                 Scott Billings
              aerogemsx AT netins DOT net
            Remove the "x" To Reply
http://www.netins.net/showcase/Comput-IT/scott/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019