From: demibee Newsgroups: comp.os.msdos.djgpp Subject: Undefined Reference to "cout" in Hello.cpp Message-ID: <2docvs0a8bp654oqaopnpkaen68blh8s61@4ax.com> X-Newsreader: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 46 Date: Wed, 25 Oct 2000 04:39:41 GMT NNTP-Posting-Host: 142.177.58.109 X-Complaints-To: abuse AT ns DOT sympatico DOT ca X-Trace: sapphire.mtt.net 972448781 142.177.58.109 (Wed, 25 Oct 2000 01:39:41 ADT) NNTP-Posting-Date: Wed, 25 Oct 2000 01:39:41 ADT Organization: Sympatico-Subscriber To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I've been using DJGPP as a backup C/C++ compiler for a year or so. Last night I downloaded the most recent ZIPs for use in DOS. I'm finding that I have no trouble with C programs. C++ is a different story. Using... C:\> gcc hello.cpp -o hello.exe ... these... ---- #include using namespace std; int main () { cout << "Hello, world." << endl; return 0; } // end main ---- #include int main () { std::cout << "Hello, world.\n"; return 0; } // end main ... yield... undefined reference to "cout" undefined reference to "endl" I've tried removing the "std::" and "using namespace" to no avail. And I've tried adding the ".h" to "iostream"... any ideas? db