delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/04/27/14:52:22

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
Message-ID: <426FDF60.3000109@scluk.com>
Date: Wed, 27 Apr 2005 19:52:16 +0100
From: "Al Slater" <al DOT slater AT scluk DOT com>
Organization: SCL
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
MIME-Version: 1.0
To: martin AT dcs DOT warwick DOT ac DOT uk
CC: cygwin AT cygwin DOT com
Subject: Re: g++ compilation header difficulties (where are they?)
References: <426FB47A DOT 6040400 AT dcs DOT warwick DOT ac DOT uk>
In-Reply-To: <426FB47A.6040400@dcs.warwick.ac.uk>
X-Spam-Processed: scluk.com, Wed, 27 Apr 2005 19:52:20 +0100 (not processed: message from valid local sender)
X-MDRemoteIP: 192.168.10.53
X-Return-Path: al DOT slater AT scluk DOT com
X-MDaemon-Deliver-To: cygwin AT cygwin DOT com
X-MDAV-Processed: scluk.com, Wed, 27 Apr 2005 19:52:23 +0100
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Russell Martin wrote:
> program only results in a "No such file or directory" error.  Using
> "find", I can only locate (for example) "stdlib.h" and there is no file
> "stdlib" anywhere.  I do have a file "iostream" in the

I beleive the header you want is cstdlib.

> euler.cpp: In function `int main(int, char**)':
> euler.cpp:21: error: `string' undeclared (first use this function)
> euler.cpp:21: error: (Each undeclared identifier is reported only once
> for each function it appears in.)
> euler.cpp:21: error: parse error before `;' token

string is in the std namespace so try std::string or add "using
namespace std;" near the top of your file.

> -----
> Despite the fact that the header file "string" is located in the
> directory /usr/include/c++/3.3.3 the compiler seemingly can't locate
> it.  This is puzzling since it lists this path in the #include
> search path above.  Even placing the source code into the
> /usr/include/c++/3.3.3 directory and trying to compile it there gives
> the same error.  What am I overlooking here, or not understanding?

Why do you think it was not found, the compiler did not output any error
messages indicating this.

- --
Al Slater

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCb99gz4fTOFL/EDYRAqBbAKCFm/TbEZxzG46TOni5sy3uv2sFAACeJM/+
8wUow/N90NRJ93qOac9pB2M=
=5Bi8
-----END PGP SIGNATURE-----


--
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