www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/07/14:13:45

From: Moogla <ngoldber AT lan DOT tjhsst DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: HELP !!!! New Programmer
Date: Thu, 05 Aug 1999 17:49:44 -0400
Organization: MindSpring Enterprises
Lines: 63
Message-ID: <37AA06F8.157CEE4E@lan.tjhsst.edu>
References: <7o7lg5$5ju$1 AT newsreader1 DOT core DOT theplanet DOT net>
NNTP-Posting-Host: a5.f7.49.3c
Mime-Version: 1.0
X-Server-Date: 5 Aug 1999 21:51:27 GMT
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com


Steve Flanagan wrote:

> Reply to steve AT flanagan DOT karoo DOT co DOT uk please ... or post replies here ...
>
> Any assistance ANYONE can offer me would be greatly appreciated and I hope
> this matter is not too trivial.
>
> I am a very green and uninitiated C++ programmer and would welcome some
> advice on the following problem I am having.
>
> I recently purchased Sams Teach Yourself C++ in 24 hours which came with
> DJGPP on an accompanying CD . I assume that, since I followed the
> installation instructions, I have all the necessary modules on my hard disk.
>
> After creating a .cpp file extension, and typing in the required code for
> Lesson 1 ( Hello World ), i managed to get to grips with the syntax for
> running the compiler. At the DOS prompt I typed gxx s.cpp -o hw.exe. ( S
> being the name I gave the text file and HW the name for the executable ).
> The compiler then returned the following error message :-
>
>  In file included from s.cpp:1:
>  c:/djgpp/lang/cxx/iostream.h:31: streambuf.h : No such file or directory
>  ENOENT )
>

This means one of two things happened:
a) you used pkunzip and streambuf.h got truncated to streambu.h (hence gxx
couldn't find it). Use Winzip to preserve long filenames. Solution? Try
reinstalling DJGPP only using WinZIP this time. But if you did that...
b) LFN is turned off in your DJGPP distribution. The latest version comes with
it enabled, older ones (maybe the one on the CD) may have it disabled. To find
out which version you've got, type gcc --version at the DOS prompt. If it's less
than 2.81, you might have to do the following:

Go to your DJGPP base directory (like C:\djgpp for example). Edit djgpp.env.

You'll see a line close to the beginning of the file like this:
+LFN=x
Where x is either y or n. Make sure it's y. You definitely want that enabled.
Save your change, then try compiling again, and see what happens.
It should work.

>
> Using find files, the file streambuf.h is located in c:\djgpp\lang\cxx and
> also in the Chapter 1 folder of the exercise directory in the Sams folder.
>
>  I am executing gxx in a dos prompt under windows. Should I do this in a
> pure DOS session?? Also the s.cpp file is located on my desktop. Should this
> be in the folder where streambuf.h  and iostream.h lie ??

Oh wait, I'm guessing a) is not the case, if you copied it right off the CD.
Then do what I suggest in b).

>  I look forward to having my problems solved soon so I can call myself a
> fellow programmer ... .we ALL have to start somewhere ....
> Thanks to all in advance.... STEVE

Your welcome.

moogla

- Raw text -


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