From: G Jaye Newsgroups: comp.os.msdos.djgpp Subject: getting gcc to work with C++ classes Date: 26 Aug 1999 23:47:01 -0500 Organization: Newscene Public Access Usenet News Service (http://www.newscene.com/) Lines: 22 Message-ID: <37C61861.832BAEDF@asan.com> NNTP-Posting-Host: 207.113.83.75 NNTP-Posting-Date: Thu, 26 Aug 1999 23:46:11 CDT X-Trace: newscene.newscene.com 935729171 207.113.83.75 (Thu, 26 Aug 1999 23:46:11 CDT) X-Mailer: Mozilla 4.61 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I'm a teacher and many of my C++ students will have Win98 systems. To that end, I just installed GNU's package (using its Win 9x hard disk installation program) on my Win98 system's E drive, and everything seems pretty well-behaved except the C++ aspect of the DJGPP gcc compiler, ver 2.7.2. (C works just fine!) Consider the statement below, given the directive #include and source file extensions cc, cpp, and cxx (I tried all 3). cout << "Hello world\n"; The 2 error messages this produces are: 1. undefined reference to 'cout' 2. undefined reference to 'ostream::operator<<(chr const *) Clearly iostream.h is being found or the 2 error messages wouldn't occur. Yet it doesn't seem to do any good. The only copy of iostream.h is in the E:\fsf\lang\cxx directory. Attempts to use the C++ string class declared in fare no better. Am I better off re-installing from the DJGPP web site or elsewhere? Hoping somebody can get tell me how to resolve this before Sept 9!!!Thanks... gary jaye