delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/08/07/10:04:32

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Subject: Problem while compiling programs, using g++, which use the string data type
Date: Thu, 7 Aug 2003 19:36:06 +0530
MIME-Version: 1.0
Message-ID: <1449D1D9E1F9904484E66495141CA3C4070BFA@ctsintdlsxub.cts.com>
X-MS-Has-Attach:
content-class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0
X-MS-TNEF-Correlator:
From: "Zafrulla, Zahoor (Cognizant)" <ZZahoor AT chn DOT cognizant DOT com>
To: <cygwin AT cygwin DOT com>

------=_NextPartTM-000-29a385e3-31e4-4c91-8873-accba82b631d
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I have been trying to compile a set of files on the latest Cygwin DLL =
release under Win 2000. The same set of files compiles perfectly fine =
under red hat linux . In order to isolate the error i wrote a test =
program and i found tht ther is some problem with programs using the c++ =
string  data type. This is the program i tried and the result after =
compilation.

******************************************
#include<string>
#include<iostream.h>

int main()
{
 string a =3D "Hello World!";
 cout << a;
 return 0;
}

*******************************************

$ g++ -w -o test teststr.c
teststr.c: In function `int main()':
teststr.c:6: `string' undeclared (first use this function)
teststr.c:6: (Each undeclared identifier is reported only once for each
   function it appears in.)
teststr.c:6: parse error before `=3D' token
teststr.c:7: `a' undeclared (first use this function)

********************************************

The test program compiles fine if i use g++-2 instead of g++. Is ther =
any particular option that i need to use ??

Can anybody tell me what the problem is.

Thanks,

Zahoor Zafrulla

------=_NextPartTM-000-29a385e3-31e4-4c91-8873-accba82b631d
Content-Type: text/plain;
	name="InterScan_Disclaimer.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="InterScan_Disclaimer.txt"

This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

		Visit us at http://www.cognizant.com


------=_NextPartTM-000-29a385e3-31e4-4c91-8873-accba82b631d
Content-Type: text/plain; charset=us-ascii

--
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/
------=_NextPartTM-000-29a385e3-31e4-4c91-8873-accba82b631d--

- Raw text -


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