Hows it going. I have set up a solaris 10 system with one user for programming. I downloaded gcc 3.3.2 from sunfreeware.com and installed it using the pkgadd command. I then added my PATH statement based on what I was told at http://everythingsolaris.org/articles/iaug/frameset.html and added this to /etc/profile: export PATH=/opt/gnome/bin:/usr/local/bin:/opt/netscape:/usr/ccs/bin:$PATH export LD_LIBRARY_PATH=/opt/gnome/lib:/usr/local/lib:/usr/lib:/lib export GNOME_PATH=/opt/gnome export MANPATH=/usr/local/man:/opt/gnome/man:$MANPATH export CPPFLAGS="-I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include" I can correctly compile c code with no errors, but I get this error when I try to use g++: $ g++ test.cpp -o test In file included from /usr/local/include/c++/3.3.2/iosfwd:50, from /usr/local/include/c++/3.3.2/ios:44, from /usr/local/include/c++/3.3.2/ostream:45, from /usr/local/include/c++/3.3.2/iostream:45, from test.cpp:1: /usr/local/include/c++/3.3.2/bits/functexcept.h:34:31: exception_defines.h: No such file or directory In file included from /usr/local/include/c++/3.3.2/ostream:45, from /usr/local/include/c++/3.3.2/iostream:45, from test.cpp:1: /usr/local/include/c++/3.3.2/ios:45:57: exception: No such file or directory In file included from /usr/local/include/c++/3.3.2/bits/localefwd.h:48, from /usr/local/include/c++/3.3.2/ios:48, from /usr/local/include/c++/3.3.2/ostream:45, from /usr/local/include/c++/3.3.2/iostream:45, from test.cpp:1: /usr/local/include/c++/3.3.2/bits/functexcept.h:34:31: exception_defines.h: No such file or directory In file included from /usr/local/include/c++/3.3.2/memory:54, from /usr/local/include/c++/3.3.2/string:48, from /usr/local/include/c++/3.3.2/bits/locale_classes.h:47, from /usr/local/include/c++/3.3.2/bits/ios_base.h:47, from /usr/local/include/c++/3.3.2/ios:49, from /usr/local/include/c++/3.3.2/ostream:45, from /usr/local/include/c++/3.3.2/iostream:45, from test.cpp:1: /usr/local/include/c++/3.3.2/bits/stl_algobase.h:69:15: new: No such file or directory In file included from /usr/local/include/c++/3.3.2/bits/stl_alloc.h:88, from /usr/local/include/c++/3.3.2/memory:55, from /usr/local/include/c++/3.3.2/string:48, from /usr/local/include/c++/3.3.2/bits/locale_classes.h:47, from /usr/local/include/c++/3.3.2/bits/ios_base.h:47, from /usr/local/include/c++/3.3.2/ios:49, from /usr/local/include/c++/3.3.2/ostream:45, from /usr/local/include/c++/3.3.2/iostream:45, from test.cpp:1: /usr/local/include/c++/3.3.2/bits/functexcept.h:34:31: exception_defines.h: No such file or directory In file included from /usr/local/include/c++/3.3.2/memory:56, from /usr/local/include/c++/3.3.2/string:48, from /usr/local/include/c++/3.3.2/bits/locale_classes.h:47, from /usr/local/include/c++/3.3.2/bits/ios_base.h:47, from /usr/local/include/c++/3.3.2/ios:49, from /usr/local/include/c++/3.3.2/ostream:45, from /usr/local/include/c++/3.3.2/iostream:45, from test.cpp:1: /usr/local/include/c++/3.3.2/bits/stl_construct.h:65:15: new: No such file or directory In file included from /usr/local/include/c++/3.3.2/ios:49, from /usr/local/include/c++/3.3.2/ostream:45, from /usr/local/include/c++/3.3.2/iostream:45, from test.cpp:1: /usr/local/include/c++/3.3.2/bits/ios_base.h:165: error: parse error before `{' token /usr/local/include/c++/3.3.2/bits/ios_base.h:175: error: destructor `failure' must match class name `ios_base' /usr/local/include/c++/3.3.2/bits/ios_base.h:363: error: parse error before ` protected' /usr/local/include/c++/3.3.2/bits/ios_base.h:383: error: syntax error before `; ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:387: error: parse error before `,' token /usr/local/include/c++/3.3.2/bits/ios_base.h:389: error: missing ';' before right brace /usr/local/include/c++/3.3.2/bits/ios_base.h:391: error: semicolon missing after declaration of `std::_Callback_list' /usr/local/include/c++/3.3.2/bits/ios_base.h:392: error: ISO C++ forbids defining types within return type /usr/local/include/c++/3.3.2/bits/ios_base.h:392: error: two or more data types in declaration of `_M_add_reference' /usr/local/include/c++/3.3.2/bits/ios_base.h:392: error: semicolon missing after declaration of `struct std::_Callback_list' /usr/local/include/c++/3.3.2/bits/ios_base.h: In function `int std::_M_add_reference()': /usr/local/include/c++/3.3.2/bits/ios_base.h:392: error: `_M_refcount' undeclared (first use this function) /usr/local/include/c++/3.3.2/bits/ios_base.h:392: error: (Each undeclared identifier is reported only once for each function it appears in.) /usr/local/include/c++/3.3.2/bits/ios_base.h: At global scope: /usr/local/include/c++/3.3.2/bits/ios_base.h:399: error: syntax error before `* ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:402: error: `event' was not declared in this scope /usr/local/include/c++/3.3.2/bits/ios_base.h:402: error: parse error before `)' token /usr/local/include/c++/3.3.2/bits/ios_base.h:431: error: 'locale' is used as a type, but is not defined as a type. /usr/local/include/c++/3.3.2/bits/ios_base.h:436: error: parse error before ` public' /usr/local/include/c++/3.3.2/bits/ios_base.h:447: error: destructors must be member functions /usr/local/include/c++/3.3.2/bits/ios_base.h: In function `bool _S_initialized()': /usr/local/include/c++/3.3.2/bits/ios_base.h:459: error: `_S_ios_base_init' undeclared (first use this function) /usr/local/include/c++/3.3.2/bits/ios_base.h: At global scope: /usr/local/include/c++/3.3.2/bits/ios_base.h:461: error: parse error before ` private' /usr/local/include/c++/3.3.2/bits/ios_base.h:464: error: parse error before `}' token /usr/local/include/c++/3.3.2/bits/ios_base.h:472: error: syntax error before `( ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:482: error: syntax error before `( ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:485: error: `__fmtfl' was not declared in this scope /usr/local/include/c++/3.3.2/bits/ios_base.h:486: error: parse error before ` return' /usr/local/include/c++/3.3.2/bits/ios_base.h:498: error: syntax error before `( ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:501: error: syntax error before ` |=' token /usr/local/include/c++/3.3.2/bits/ios_base.h:515: error: syntax error before `( ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:518: error: syntax error before ` &=' token /usr/local/include/c++/3.3.2/bits/ios_base.h:519: error: syntax error before ` |=' token /usr/local/include/c++/3.3.2/bits/ios_base.h:530: error: `fmtflags' was not declared in this scope /usr/local/include/c++/3.3.2/bits/ios_base.h:530: error: parse error before `)' token /usr/local/include/c++/3.3.2/bits/ios_base.h: In function `void unsetf(...)': /usr/local/include/c++/3.3.2/bits/ios_base.h:530: error: `__mask' undeclared (first use this function) /usr/local/include/c++/3.3.2/bits/ios_base.h: At global scope: /usr/local/include/c++/3.3.2/bits/ios_base.h:542: error: syntax error before `( ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:550: error: syntax error before `( ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:553: error: `__prec' was not declared in this scope /usr/local/include/c++/3.3.2/bits/ios_base.h:554: error: parse error before ` return' /usr/local/include/c++/3.3.2/bits/ios_base.h:564: error: syntax error before `( ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:572: error: syntax error before `( ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:575: error: `__wide' was not declared in this scope /usr/local/include/c++/3.3.2/bits/ios_base.h:576: error: parse error before ` return' /usr/local/include/c++/3.3.2/bits/ios_base.h:603: error: parse error before `&' token /usr/local/include/c++/3.3.2/bits/ios_base.h:614: error: syntax error before `( ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:623: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:660: error: destructors must be member functions /usr/local/include/c++/3.3.2/bits/ios_base.h:662: error: parse error before ` protected' /usr/local/include/c++/3.3.2/bits/ios_base.h:670: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:677: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:685: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:693: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:701: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:709: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:717: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:725: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:733: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:741: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:749: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:757: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:765: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:773: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:781: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:790: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:798: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:806: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:815: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:823: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:831: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:840: error: syntax error before `& ' token /usr/local/include/c++/3.3.2/bits/ios_base.h:848: error: syntax error before `& ' token In file included from /usr/local/include/c++/3.3.2/ios:50, from /usr/local/include/c++/3.3.2/ostream:45, from /usr/local/include/c++/3.3.2/iostream:45, from test.cpp:1: /usr/local/include/c++/3.3.2/streambuf:218: error: syntax error before `;' token /usr/local/include/c++/3.3.2/streambuf:225: error: data member `_M_buf_locale' cannot be a member template /usr/local/include/c++/3.3.2/streambuf:232: error: data member ` _M_buf_locale_init' cannot be a member template /usr/local/include/c++/3.3.2/streambuf:245: error: default argument for template parameter for class enclosing `std::_S_pback_size' /usr/local/include/c++/3.3.2/streambuf:245: error: template definition of non-template `const size_t std::_S_pback_size' /usr/local/include/c++/3.3.2/streambuf:411: error: no type `seekdir' in ` std::ios_base' /usr/local/include/c++/3.3.2/streambuf:411: error: parse error before `,' token /usr/local/include/c++/3.3.2/streambuf:413: error: template definition of non-template `typename _Traits::pos_type std::ios_base::pubseekoff(...)' /usr/local/include/c++/3.3.2/streambuf:417: error: no type `openmode' in ` std::ios_base' /usr/local/include/c++/3.3.2/streambuf:417: error: parse error before `=' token /usr/local/include/c++/3.3.2/streambuf:418: error: template definition of non-template `typename _Traits::pos_type std::ios_base::pubseekpos(...)' /usr/local/include/c++/3.3.2/streambuf:724: error: no type `seekdir' in ` std::ios_base' /usr/local/include/c++/3.3.2/streambuf:725: error: no type `openmode' in ` std::ios_base' /usr/local/include/c++/3.3.2/streambuf:726: error: template definition of non-template `virtual typename _Traits::pos_type std::ios_base::seekoff(typename _Traits::off_type)' /usr/local/include/c++/3.3.2/streambuf:737: error: no type `openmode' in ` std::ios_base' /usr/local/include/c++/3.3.2/streambuf:738: error: template definition of non-template `virtual typename _Traits::pos_type std::ios_base::seekpos(typename _Traits::pos_type)' /usr/local/include/c++/3.3.2/streambuf:413: error: template definition of non-template `typename _Traits::pos_type std::basic_streambuf<_CharT, _Traits>::pubseekoff(...)' /usr/local/include/c++/3.3.2/streambuf:418: error: template definition of non-template `typename _Traits::pos_type std::basic_streambuf<_CharT, _Traits>::pubseekpos(...)' /usr/local/include/c++/3.3.2/streambuf: In constructor ` std::basic_streambuf<_CharT, _Traits>::basic_streambuf()': /usr/local/include/c++/3.3.2/streambuf:580: error: class ` std::basic_streambuf<_CharT, _Traits>' does not have any field named ` _M_mode' /usr/local/include/c++/3.3.2/streambuf:580: error: class ` std::basic_streambuf<_CharT, _Traits>' does not have any field named ` _M_buf_locale' /usr/local/include/c++/3.3.2/streambuf: At global scope: /usr/local/include/c++/3.3.2/streambuf:726: error: template definition of non-template `virtual typename _Traits::pos_type std::basic_streambuf<_CharT, _Traits>::seekoff(typename _Traits::off_type)' /usr/local/include/c++/3.3.2/streambuf:738: error: template definition of non-template `virtual typename _Traits::pos_type std::basic_streambuf<_CharT, _Traits>::seekpos(typename _Traits::pos_type)' In file included from /usr/local/include/c++/3.3.2/streambuf:934, from /usr/local/include/c++/3.3.2/ios:50, from /usr/local/include/c++/3.3.2/ostream:45, from /usr/local/include/c++/3.3.2/iostream:45, from test.cpp:1: /usr/local/include/c++/3.3.2/bits/streambuf.tcc:44: error: template definition of non-template `const size_t std::basic_streambuf<_CharT, _Traits>::_S_pback_size' /usr/local/include/c++/3.3.2/bits/streambuf.tcc: In function `streamsize std::__copy_streambufs(std::basic_ios<_CharT, _Traits>&, std::basic_streambuf<_CharT, _Traits>*, std::basic_streambuf<_CharT, _Traits>*)': /usr/local/include/c++/3.3.2/bits/streambuf.tcc:228: error: parse error before `&' token /usr/local/include/c++/3.3.2/bits/streambuf.tcc: At global scope: /usr/local/include/c++/3.3.2/bits/streambuf.tcc:234: error: parse error before `return' /usr/local/include/c++/3.3.2/bits/streambuf.tcc:241: error: `basic_streambuf' is not a template /usr/local/include/c++/3.3.2/bits/streambuf.tcc:241: error: explicit instantiation of non-template type `<type error>' /usr/local/include/c++/3.3.2/bits/streambuf.tcc:244: error: explicit instantiation of non-template `int streamsize' /usr/local/include/c++/3.3.2/bits/streambuf.tcc:244: error: parse error before `(' token /usr/local/include/c++/3.3.2/bits/streambuf.tcc:248: error: `basic_streambuf' is not a template /usr/local/include/c++/3.3.2/bits/streambuf.tcc:248: error: explicit instantiation of non-template type `<type error>' /usr/local/include/c++/3.3.2/bits/streambuf.tcc:251: error: explicit instantiation of non-template `int streamsize' /usr/local/include/c++/3.3.2/bits/streambuf.tcc:251: error: parse error before `(' token In file included from /usr/local/include/c++/3.3.2/bits/basic_ios.h:44, from /usr/local/include/c++/3.3.2/ios:51, from /usr/local/include/c++/3.3.2/ostream:45, from /usr/local/include/c++/3.3.2/iostream:45, from test.cpp:1: /usr/local/include/c++/3.3.2/bits/locale_facets.h:65: error: no type `iostate' in `std::ios_base' /usr/local/include/c++/3.3.2/bits/locale_facets.h:65: error: parse error before `&' token /usr/local/include/c++/3.3.2/bits/locale_facets.h:66: error: template definition of non-template `void std::__convert_to_v(...)' /usr/local/include/c++/3.3.2/bits/locale_facets.h:66: confused by earlier errors, bailing out My test program is simply this: #include <iostream> int main(int argc, char* argv[]) { cout << "hello world" << endl; return 0; } Am I missing a path to the libaries or something? - Justin