Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Dave Korn" To: Subject: RE: Errors in #include files when compiling a Legacy C++ Application Date: Wed, 30 Mar 2005 14:39:50 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: Message-ID: X-OriginalArrivalTime: 30 Mar 2005 13:40:31.0482 (UTC) FILETIME=[0ABC7DA0:01C5352E] ----Original Message---- >From: Brian K. Whatcott >Sent: 28 March 2005 17:52 > I am forwarding this reply and the simpler example on to the mailing list. > The attached files are: > > hello.cc - Hello world that writes to a file, instead > of cout. > command.txt - The compile command. > hello_errors.txt - File with the errors from the compile. > cygcheck.out - The cycheck output file. > > All files are straight text (probably with Unix/Linux end of lines). Removing that bogus "-I/usr/include/machine" option helps. Don't try to second-guess the compiler! It knows perfectly well where to find all the system header files, and if you start needlessly adding -I options just because you think it "looks right", you'll only go and mess up its very-carefully arranged search path. The -I option should only ever be used to add the path(s) to *your* header files from your app, and the occasional library files (such as the X11R6 files), and never for system/compiler includes. After that you're just left with the error where you've typo'd 'oftream', which AFAIK is not any kind of C++ object, and the fact that you're trying to #include "strstream.h", which was deprecated and does not exist any more, and the fact that you aren't using ostream correctly, since (at least as far as I can see from a quick google) it doesn't construct from a string but from a reference to a streambuf-derived class object, but those are all general c++ programming errors that are not related to cygwin, and that I can't really advise on, because I don't know much about STL. cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/