delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/12/02:30:28

From: yogui_freeserver AT hotmail DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: q: Include path w/ GXX.
Date: Mon, 12 Jun 2000 06:09:47 GMT
Organization: Deja.com - Before you buy.
Lines: 27
Message-ID: <8i1ur7$io3$1@nnrp1.deja.com>
References: <8i18f9$5av$1 AT nnrp1 DOT deja DOT com>
NNTP-Posting-Host: 216.123.139.110
X-Article-Creation-Date: Mon Jun 12 06:09:47 2000 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)
X-Http-Proxy: 1.1 x54.deja.com:80 (Squid/1.1.22) for client 216.123.139.110
X-MyDeja-Info: XMYDJUIDyogui_freeserver
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <8i18f9$5av$1 AT nnrp1 DOT deja DOT com>,
  Karr0t T0p <Karr0t_T0p AT yahoo DOT com> wrote:
> When I use DJGXX, the include path is \include\ when it really has to
> be \lang\gxx\ or something like that.

Both paths are good. If you write this in your ".cpp" (or ".cc") file,
it will work fine:

#include <iostream.h>
#include <stdio.h>

This is because both "\include\" _AND_ "\lang\gxx\" are valid include
paths.

If you want to add a include directory at compile time, you have to use
the -I switch like this:

 gcc -Ipath/to/include/ foo.cpp -o foo.exe -lstdcxx

Normally, gcc set the "\lang\gxx\" path when he sees that your file is
in C++ (The extention of your file _MUST_ be ".cc" or ".cpp")

Yogui (yogui_freeserver AT hotmail DOT com)


Sent via Deja.com http://www.deja.com/
Before you buy.

- Raw text -


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