www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/23/19:46:28

From: George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: [Q] Can djgpp compile the C++ source ???
Date: 23 Jan 1998 23:55:38 GMT
Organization: Oxford University, England
Lines: 25
Message-ID: <6abalq$8a3$2@news.ox.ac.uk>
References: <34c7ce4e DOT 2169674 AT news DOT kreonet DOT re DOT kr> <19980123195801 DOT OAA28730 AT ladder01 DOT news DOT aol DOT com>
NNTP-Posting-Host: sable.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On 23 Jan 1998 19:58:59 GMT in comp.os.msdos.djgpp AmyBred
<amybred AT aol DOT com> wrote:

: Edit your file "djgpp.env", which should be located in your c:\djgpp directory.
:  The language is a little cryptic, but make sure it indicates the correct
: location of your include files.

Editing djgpp.env is a *very* bad idea in most normal cases.  It's
easy to break things that way, and since when people ask for tech
support here they usually don't bother posting any system files
(contrary to the requests in the FAQ) it would make diagnosing strange
behaviour very difficult indeed.

There's a reason why the C++ include files aren't in the include path
for C programs -- C programs shouldn't be using them.  If the program
wants to use those headers, it's a C++ program and should be compiled
as a .cc, .C, etc file, or by using the command line options to gcc to
tell it that the code is C++.

Changing the include path like this just covers up the problem; as
soon as you try to use a C++ feature like function overloading or
mid-block declarations you'll just get bitten again.

-- 
george DOT foot AT merton DOT oxford DOT ac DOT uk

- Raw text -


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