From: j DOT aldrich6 AT genie DOT com Message-Id: <199607252318.AA165756695@relay1.geis.com> Date: Thu, 25 Jul 96 23:09:00 UTC 0000 To: sansone AT aol DOT com Cc: djgpp AT delorie DOT com Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Subject: Re: A DJGPP BOOK Reply to message 8712204 from SANSONE AT AOL DOT C on 07/25/96 1:15AM >I recently bought the gnu compiler tools cdrom with the djgpp 1.12.m4 >version, and I am having problems getting running. When I try to compile >a simple C++ program I get the following errors. > >1. undefined reference to endl. >2. undefined reference to cout. > >I don't understand, the program should compile with no problems. endl and >cout are c++ code aren't they? Please help. Yes, but they are in the C++ libraries, which aren't automatically linked by gcc when you compile (it only links the C libraries by default). You have to add '-lgpp' to the end of your compile command line to get the standard C++ functions and classes linked. The FAQ gives a lot more details about this (including some other C++ libraries which contain additional stuff). If you have the inclination, and find you like DJGPP, I'd recommend upgrading to version 2, which is a lot better than v1.*, fixes a lot of bugs, and makes a lot of things easier in general. You can get it from any SimTel site (i.e.: ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2*). Be sure to read the 'readme.1st' file before downloading anything, and definitely read the new FAQ (faq201b.zip) to see what's changed from v1 to v2 (amongst other things). BTW, I don't mean this to sound like a plug for v2 - it's just that v1.* is obsolete and no longer supported by the DJGPP development team. You can still get answers to your problems, of course, but you won't see any new software or bug fixes for v1. The book you bought has been out for quite a while, so it's a bit out of date, but there's a new DJGPP book project in the works which will contain the latest versions of all software. ;) John