|
From: <mar...@po...> - 2003-05-12 22:22:09
|
Hi, I am newbie in DevC++ and gcc so excuse me my question. And sorry for my English. I have got the C++ sources which I can compile successfully with gcc 3.2 at Cygwin. What changes should I make to these sources in order to compile them in DevC++. Does DevC++ 5.0 use gcc 3.2 ? May I use gcc makefiles in DevC++ ? Below, there is a fragment of code that causes compilation error - strstream, strstreambuf, istrstream and ostrstream - not declared. ========================================================== #ifndef SC_IOSTREAM_H #define SC_IOSTREAM_H #if !defined( _MSC_VER ) && !defined( __HP_aCC ) && !defined( __BORLANDC__ ) #include <iostream> #include <strstream> using std::ios; using std::streambuf; using std::streampos; using std::streamsize; using std::iostream; using std::istream; using std::ostream; using std::strstream; using std::strstreambuf; using std::istrstream; using std::ostrstream; using std::cin; using std::cout; using std::cerr; using std::endl; using std::flush; using std::dec; using std::hex; using std::oct; #include <fstream> using std::fstream; using std::ifstream; using std::ofstream; #include <cstddef> using std::size_t; #include <cstring> using std::memchr; using std::memcmp; using std::memcpy; using std::memmove; using std::memset; using std::strcat; using std::strncat; using std::strchr; using std::strrchr; using std::strcmp; using std::strncmp; using std::strcpy; using std::strncpy; using std::strcspn; using std::strspn; using std::strlen; using std::strpbrk; using std::strstr; using std::strtok; #else #if defined( _MSC_VER ) // VC++6 with standard library #include <iostream> #include <strstream> using std::ios; using std::streambuf; using std::streampos; using std::streamsize; using std::iostream; using std::istream; using std::ostream; using std::strstream; using std::strstreambuf; using std::istrstream; using std::ostrstream; using std::cin; using std::cout; using std::cerr; using std::endl; using std::flush; using std::dec; using std::hex; using std::oct; #include <fstream> using std::fstream; using std::ifstream; using std::ofstream; #include <cstddef> #else #if defined( __HP_aCC ) // HP aCC #include <iostream.h> #include <strstream.h> #include <fstream.h> #endif #endif #endif // shortcuts that save some typing #ifdef CCAST #undef CCAST #endif #define CCAST const_cast #ifdef DCAST #undef DCAST #endif #define DCAST dynamic_cast #ifdef RCAST #undef RCAST #endif #define RCAST reinterpret_cast #ifdef SCAST #undef SCAST #endif #define SCAST static_cast #endif ======================================================== and there is an error message: ======================================================== D:/Designs/SystemC/systemc-2.0.1/src/systemc/utils/sc_iostream.h:51: `strstream ' not declared D:/Designs/SystemC/systemc-2.0.1/src/systemc/utils/sc_iostream.h:52: ` strstreambuf' not declared D:/Designs/SystemC/systemc-2.0.1/src/systemc/utils/sc_iostream.h:53: ` istrstream' not declared D:/Designs/SystemC/systemc-2.0.1/src/systemc/utils/sc_iostream.h:54: ` ostrstream' not declared ========================================================= |