Mail Archives: djgpp/1998/12/27/21:55:10
From: | dyliu AT ms1 DOT hinet DOT net (Dong-Yueh Liu)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Fail to compile C++ program
|
Date: | Mon, 28 Dec 1998 02:46:15 GMT
|
Organization: | New Silkera Network
|
Lines: | 37
|
Message-ID: | <3687f0e2.9856212@news.silkera.net>
|
NNTP-Posting-Host: | ts0073.tc.silkera.net
|
Mime-Version: | 1.0
|
X-Newsreader: | Forte Agent 1.5/32.451
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
I never use the DJGPP v2 before. I get these following files:
djdev202.zip, gcc281b.zip, gpp281b.zip, bnu281b.zip, mak377b.zip.
Following the install instructions in readme.lst, I unzip these files
to the D:\DJGPP and perserve their directory structure. I also
set the PATH environment variable to include D:\DJGPP and set
DJGPP=C:\DJGPP\DJGPP.ENV . My OS is Windows NT 4.0.
My next step is to write a C version of hello.c and try to compile
and execute it. The result is good. The next step is to write a C++
version of hell.cpp. Its source code is:
---------------------------------------------------
#include <iostream>
int main()
{
cout << "hello!" << endl;
return 0;
}
------------------------------------------------------
Then I try to compile this program using the following command line:
gcc hello.cpp -o hello.exe
But the compilation failed. The error message is
In file included from d:/djgpp/lang/cxx/iostream:6,
from hello.cpp:1:
d:/djgpp/lang/cxx/iostream.h:31: streambuf.h: No such file or
directory (ENOENT)
When I check the directory d:\djgpp\lang\cxx\, it has the
streambuf.h file. So I don't know what's wrong. Please help me
to solve this problem. Thanks!
Dong-Yueh Liu
- Raw text -