www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/10/18:01:57

From: Dan Levin <dan DOT levin AT mailbox DOT swipnet DOT se>
Newsgroups: comp.os.msdos.djgpp
Subject: Problems with C++ prgrams and headerfiles...
Date: Tue, 10 Mar 1998 21:53:43 +0100
Organization: A customer of Tele2
Lines: 153
Message-ID: <3505A857.E1FEA229@mailbox.swipnet.se>
NNTP-Posting-Host: mn8.swip.net
Mime-Version: 1.0
Cache-Post-Path: mn8!s-35471 AT dialup88-10-16 DOT swipnet DOT se
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

--------------AACD0F2B910CEE8ACDC5F9D1
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I recently installed the new 2.8 environment.
I used the file picker at DJGPP's site and here what it said:

djdev201.zip
faq210b.zip
readme.1st

rhide14b.zip

bnu281.zip
gcc280.zip
gpp280b.zip
lgpp280.zip
mak3761.zip
txi390b.zip

csdpmi4b.zip

I installed everything and first I tried the "Hello world" - program
written i C.
It worked Ok.

Then I did the same in C++ - and here is the code:

#include <iostream.h>

main()
{
 int x;

 cout << "Hello, C++ world !" << endl;

}

 ..and now to the funny part - the error message :

hello.cpp(1) In file included from hello.cpp:1:
i:/djgpp/lang/cxx/iostream.h (1) Error: streambuf.h: No such file or
diectory (EOENT)

Apparently the preprocessor is able to include iostream.h - but not
streambuf.h - which is to
be pulled in from inside iostream.h ! But these 2 headerfiles are placed
in the same folder !!!

I have noticed that other ppl have prblems with header files when it
comes to C++ programming
within our outside Rhide. Is there a common link ? It looks like there
is a searchpath missing somewhere,
but this section is found in djgpp.env:

[cpp]
CPLUS_INCLUDE_PATH=%/>;CPLUS_INCLUDE_PATH%%DJDIR%/lang/cxx;%DJDIR%/include;%DJDIR%/contrib/grx20/include

C_INCLUDE_PATH=%/>;C_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/contrib/grx20/include

OBJCPLUS_INCLUDE_PATH=%/>;OBJCPLUS_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/lang/objc

OBJC_INCLUDE_PATH=%/>;OBJC_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/lang/objc

...and this path: CPLUS_INCLUDE_PATH%%DJDIR%/lang/cxx; should suffice -
No ?

So I'm stuck in C++ programming...I'd be glad if somebody could help me
!!  Thanks in advance !







--------------AACD0F2B910CEE8ACDC5F9D1
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>
I recently installed the new 2.8 environment.
<BR>I used the file picker at DJGPP's site and here what it said:

<P>djdev201.zip
<BR>faq210b.zip
<BR>readme.1st

<P>rhide14b.zip

<P>bnu281.zip
<BR>gcc280.zip
<BR>gpp280b.zip
<BR>lgpp280.zip
<BR>mak3761.zip
<BR>txi390b.zip

<P>csdpmi4b.zip

<P>I installed everything and first I tried the "Hello world" - program
written i C.
<BR>It worked Ok.

<P>Then I did the same in C++ - and here is the code:

<P><TT>#include &lt;iostream.h></TT>

<P><TT>main()</TT>
<BR><TT>{</TT>
<BR><TT>&nbsp;int x;</TT>

<P><TT>&nbsp;cout &lt;&lt; "Hello, C++ world !" &lt;&lt; endl;</TT>

<P><TT>}</TT>
<BR>&nbsp;
<BR>&nbsp;..and now to the funny part - the error message :

<P><TT>hello.cpp(1) In file included from hello.cpp:1:</TT>
<BR><TT>i:/djgpp/lang/cxx/iostream.h (1) Error: streambuf.h: No such file
or diectory (EOENT)</TT>

<P>Apparently the preprocessor is able to include <TT>iostream.h</TT> -
but not <TT>streambuf.h</TT> - which is to
<BR>be pulled in from inside <TT>iostream.h </TT>! But these 2 headerfiles
are placed in the same folder !!!

<P>I have noticed that other ppl have prblems with header files when it
comes to C++ programming
<BR>within our outside Rhide. Is there a common link ? It looks like there
is a searchpath missing somewhere,
<BR>but this section is found in djgpp.env:

<P><TT>[cpp]</TT>
<BR><TT><FONT SIZE=-1>CPLUS_INCLUDE_PATH=%/>;CPLUS_INCLUDE_PATH%%DJDIR%/lang/cxx;%DJDIR%/include;%DJDIR%/contrib/grx20/include</FONT></TT>
<BR><TT><FONT SIZE=-1>C_INCLUDE_PATH=%/>;C_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/contrib/grx20/include</FONT></TT>
<BR><TT><FONT SIZE=-1>OBJCPLUS_INCLUDE_PATH=%/>;OBJCPLUS_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/lang/objc</FONT></TT>
<BR><TT><FONT SIZE=-1>OBJC_INCLUDE_PATH=%/>;OBJC_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/lang/objc</FONT></TT>

<P>...and this path: <TT><FONT SIZE=-1>CPLUS_INCLUDE_PATH%%DJDIR%/lang/cxx;
</FONT></TT>should suffice - No ?

<P>So I'm stuck in C++ programming...I'd be glad if somebody could help
me !!&nbsp; Thanks in advance !

<P>&nbsp;

<P>&nbsp;
<BR>&nbsp;
<BR>&nbsp;</HTML>

--------------AACD0F2B910CEE8ACDC5F9D1--

- Raw text -


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