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 = "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 `=' 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
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

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

Reply via email to