[Mingw-users] Problem with string object on mingw.
- Date: Wed, 14 May 2008 16:58:39 -0300
- From: "Rafael Anschau" <rafael.anschau@xxxxxxxxx>
- Subject: [Mingw-users] Problem with string object on mingw.
This code compiles with borland 5.5.1, but fails with g++ .The message I get is:
`string' does not name a type
#include<iostream.h>
#include<string.h>
#include<strings.h>
#include<string>
class Animal {
string t;
};
int main(void) {
return 0;
}
And here is the actual compiling:
C:\programac\temp>bcc32 15.1.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
15.1.cpp:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
C:\programac\temp>g++ 15.1.cpp
In file included from C:/programac/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../..
/../include/c++/3.4.2/backward/iostream.h:31,
from 15.1.cpp:1:
C:/programac/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/
backward/backward_warning.h:32:2: warning: #warning This file includes at least
one deprecated or antiquated header. Please consider using one of the 32 headers
found in section 17.4.1.2 of the C++ standard. Examples include substituting th
e <X> header for the <X.h> header for C++ includes, or <iostream> instead of the
deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
15.1.cpp:7: error: `string' does not name a type
C:\programac\temp>
`string' does not name a type
#include<iostream.h>
#include<string.h>
#include<strings.h>
#include<string>
class Animal {
string t;
};
int main(void) {
return 0;
}
And here is the actual compiling:
C:\programac\temp>bcc32 15.1.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
15.1.cpp:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
C:\programac\temp>g++ 15.1.cpp
In file included from C:/programac/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../..
/../include/c++/3.4.2/backward/iostream.h:31,
from 15.1.cpp:1:
C:/programac/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/
backward/backward_warning.h:32:2: warning: #warning This file includes at least
one deprecated or antiquated header. Please consider using one of the 32 headers
found in section 17.4.1.2 of the C++ standard. Examples include substituting th
e <X> header for the <X.h> header for C++ includes, or <iostream> instead of the
deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
15.1.cpp:7: error: `string' does not name a type
C:\programac\temp>
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ MinGW-users mailing list MinGW-users@xxxxxxxxxxxxxxxxxxxxx You may change your MinGW Account Options or unsubscribe at: https://lists.sourceforge.net/lists/listinfo/mingw-users
- Follow-Ups:
- Re: [Mingw-users] Problem with string object on mingw.
- From: Dave Korn
- Re: [Mingw-users] Problem with string object on mingw.
- From: Greg Chicares
- Re: [Mingw-users] Problem with string object on mingw.
- Prev by Date: Re: [Mingw-users] __cpu__feauters_init
- Next by Date: [Mingw-users] Including GDI+ in MinGW
- Previous by thread: [Mingw-users] __cpu__feauters_init
- Next by thread: Re: [Mingw-users] Problem with string object on mingw.
- Index(es):