Sun Studio C++ - comilation error in stdexcept and iostream.

来源:互联网 发布:vscode如何连接github 编辑:程序博客网 时间:2024/06/08 10:57
compiling with C++ source and got the following erros inside stdexcept and iostream"/export/home/opt/SUNWspro/prod/include/CC/Cstd/./stdexcept", line 57: Error: Function std::logic_error::~logic_error() can throw only the exceptions thrown by the function std::exception::~exception() it overrides. "/export/home/opt/SUNWspro/prod/include/CC/Cstd/./stdexcept", line 60: Error: Function std::logic_error::what() const can throw only the exceptions thrown by the function std::exception::what() const it overrides. "/export/home/opt/SUNWspro/prod/include/CC/Cstd/./stdexcept", line 128: Error: Function std::runtime_error::~runtime_error() can throw only the exceptions thrown by the function std::exception::~exception() it overrides. "/export/home/opt/SUNWspro/prod/include/CC/Cstd/./stdexcept", line 131: Error: Function std::runtime_error::what() const can throw only the exceptions thrown by the function std::exception::what() const it overrides. "/export/home/opt/SUNWspro/prod/include/CC/Cstd/./istream", line 41: Error: Use ";" to terminate declarations. "/export/home/opt/SUNWspro/prod/include/CC/Cstd/iostream.h", line 4: Error: istream is not a member of std::std::std. "/export/home/opt/SUNWspro/prod/include/CC/Cstd/iostream.h", line 5: Error: cin is not a member of std::std::std. "/export/home/opt/SUNWspro/prod/include/CC/Cstd/iostream.h", line 6: Error: ws is not a member of std::std::std. "/export/home/opt/SUNWspro/prod/include/CC/Cstd/iostream.h", line 9: Error: ostream is not a member of std::std::std. "/export/home/opt/SUNWspro/prod/include/CC/Cstd/iostream.h", line 10: Error: cout is not a member of std::std::std. "/export/home/opt/SUNWspro/prod/include/CC/Cstd/iostream.h", line 11: Error: cerr is not a member of std::std::std. "/export/home/opt/SUNWspro/prod/include/CC/Cstd/iostream.h", line 12: Error: clog is not a member of std::std::std. "/export/home/opt/SUNWspro/prod/include/CC/Cstd/iostream.h", line 14: Error: ios is not a member of std::std::std.Here have 2 problems:1.stdexcept2.istreamSolve:1.by redefining _RWSTD_THROW_SPEC_NULL to "throw()" in the file "/opt/SUNWspro/WS6U2/include/CC/Cstd/./stdexcept"like this://DAVE HACK FROM HERE... #ifdef _RWSTD_THROW_SPEC_NULL #undef _RWSTD_THROW_SPEC_NULL #endif #define _RWSTD_THROW_SPEC_NULL throw() // ...TO HERE2. Solving......