Message-ID: <3DB53B9A.69E3CD42@earthlink.net> From: Martin Ambuhl X-Mailer: Mozilla 4.79 [en]C-CCK-MCD NSCPCD479 (Win95; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP library problems References: <9eaaru8aiacj7dq3rdgs36n9avatmklrn4 AT 4ax DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 47 Date: Tue, 22 Oct 2002 11:50:16 GMT NNTP-Posting-Host: 67.210.12.102 X-Complaints-To: abuse AT earthlink DOT net X-Trace: newsread1.prod.itd.earthlink.net 1035287416 67.210.12.102 (Tue, 22 Oct 2002 04:50:16 PDT) NNTP-Posting-Date: Tue, 22 Oct 2002 04:50:16 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Tatterdemalian wrote: > > Yet another weird problem with DJGPP. > > I'm trying to get a program that uses streams to compile. I have the > includes set according to ANSI standards, and the compiler finds them > without any trouble (no compile-time warnings about missing libraries > or anything). > > Then it gets to my first use of cout, and it announces that "the > identifier cout has not been declared." All the other functions, > including several libc functions, are also marked undeclared. > > What did I do wrong? Without seeing your code, it's hard to say. Try the following code. If it compiles & runs, you will know how to write the code you need. Remember to compile using gxx, rather than gcc. #include void foo1(); void foo2(); int main() { foo1(); foo2(); } // using explicit scoping void foo1() { std::cout << "This is from foo1." << std::endl; } // using namespace using namespace std; void foo2() { cout << "This is from foo2." << endl; } ------ output ------ This is from foo1. This is from foo2.