delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/30/08:40:46

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
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
In-Reply-To: <NUTMEGeIAWBwMUirY19000004e9@NUTMEG.CAM.ARTIMI.COM>
Message-ID: <SERRANO8ga5UHNvGw9U0000001d@SERRANO.CAM.ARTIMI.COM>
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019