Jimmey
January 9th, 2006, 07:25 PM
Simple, hello world:
Include <iostream>
using namespace std;
int main(){
cout << "Hello world.";
cin.get;
}
With G++:
g++ /home/james/programming/hello.cpp
Returns:
/usr/include/c++/4.0.2/bits/locale_facets.tcc:2648: error: ‘mbstate_t’ was not declared in this scope
/usr/include/c++/4.0.2/bits/locale_facets.tcc:2648: error: template argument 3 is invalid
/usr/include/c++/4.0.2/bits/locale_facets.tcc:2649: error: ‘mbstate_t’ was not declared in this scope
/usr/include/c++/4.0.2/bits/locale_facets.tcc:2649: error: template argument 3 is invalid
/usr/include/c++/4.0.2/bits/locale_facets.tcc:2649: error: template-id ‘use_facet<<expression error> >’ for ‘const int& std::use_facet(const std::locale&)’ does not match any template declaration
/usr/include/c++/4.0.2/bits/locale_facets.tcc:2705: error: ‘mbstate_t’ was not declared in this scope
/usr/include/c++/4.0.2/bits/locale_facets.tcc:2705: error: template argument 3 is invalid
/usr/include/c++/4.0.2/bits/locale_facets.tcc:2705: error: template-id ‘has_facet<<expression error> >’ for ‘bool std::has_facet(const std::locale&)’ does not match any template declaration
/usr/include/c++/4.0.2/ostream: In instantiation of ‘std::basic_ostream<char, std::char_traits<char> >’:
/usr/include/c++/4.0.2/bits/ostream.tcc:680: instantiated from here
/usr/include/c++/4.0.2/ostream:64: error: no type named ‘off_type’ in ‘struct std::char_traits<char>’
/usr/include/c++/4.0.2/bits/ostream.tcc:451: error: no type named ‘off_type’ in ‘struct std::char_traits<char>’
/usr/include/c++/4.0.2/ostream: In instantiation of ‘std::basic_ostream<wchar_t, std::char_traits<wchar_t> >’:
/usr/include/c++/4.0.2/bits/ostream.tcc:692: instantiated from here
/usr/include/c++/4.0.2/ostream:62: error: no type named ‘int_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/ostream:64: error: no type named ‘off_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/bits/ostream.tcc:451: error: no type named ‘off_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream: In instantiation of ‘std::basic_istream<char, std::char_traits<char> >’:
/usr/include/c++/4.0.2/istream:580: instantiated from here
/usr/include/c++/4.0.2/istream:65: error: no type named ‘off_type’ in ‘struct std::char_traits<char>’
/usr/include/c++/4.0.2/istream:569: error: no type named ‘off_type’ in ‘struct std::char_traits<char>’
/usr/include/c++/4.0.2/istream: In instantiation of ‘std::basic_istream<wchar_t, std::char_traits<wchar_t> >’:
/usr/include/c++/4.0.2/istream:596: instantiated from here
/usr/include/c++/4.0.2/istream:63: error: no type named ‘int_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream:65: error: no type named ‘off_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream:272: error: no type named ‘int_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream:427: error: no type named ‘int_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream:438: error: no type named ‘int_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream:569: error: no type named ‘off_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream: In instantiation of ‘std::basic_iostream<char, std::char_traits<char> >’:
/usr/include/c++/4.0.2/bits/istream.tcc:1273: instantiated from here
/usr/include/c++/4.0.2/istream:757: error: no type named ‘off_type’ in ‘struct std::char_traits<char>’
/usr/include/c++/4.0.2/istream: In instantiation of ‘std::basic_istream<wchar_t, std::char_traits<wchar_t> >::sentry’:
/usr/include/c++/4.0.2/bits/istream.tcc:1276: instantiated from here
/usr/include/c++/4.0.2/istream:630: error: no type named ‘int_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream: In instantiation of ‘std::basic_iostream<wchar_t, std::char_traits<wchar_t> >’:
/usr/include/c++/4.0.2/bits/istream.tcc:1281: instantiated from here
/usr/include/c++/4.0.2/istream:755: error: no type named ‘int_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream:757: error: no type named ‘off_type’ in ‘struct std::char_traits<wchar_t>’
james@ubuntu:~$
Ehrm...Help?
Include <iostream>
using namespace std;
int main(){
cout << "Hello world.";
cin.get;
}
With G++:
g++ /home/james/programming/hello.cpp
Returns:
/usr/include/c++/4.0.2/bits/locale_facets.tcc:2648: error: ‘mbstate_t’ was not declared in this scope
/usr/include/c++/4.0.2/bits/locale_facets.tcc:2648: error: template argument 3 is invalid
/usr/include/c++/4.0.2/bits/locale_facets.tcc:2649: error: ‘mbstate_t’ was not declared in this scope
/usr/include/c++/4.0.2/bits/locale_facets.tcc:2649: error: template argument 3 is invalid
/usr/include/c++/4.0.2/bits/locale_facets.tcc:2649: error: template-id ‘use_facet<<expression error> >’ for ‘const int& std::use_facet(const std::locale&)’ does not match any template declaration
/usr/include/c++/4.0.2/bits/locale_facets.tcc:2705: error: ‘mbstate_t’ was not declared in this scope
/usr/include/c++/4.0.2/bits/locale_facets.tcc:2705: error: template argument 3 is invalid
/usr/include/c++/4.0.2/bits/locale_facets.tcc:2705: error: template-id ‘has_facet<<expression error> >’ for ‘bool std::has_facet(const std::locale&)’ does not match any template declaration
/usr/include/c++/4.0.2/ostream: In instantiation of ‘std::basic_ostream<char, std::char_traits<char> >’:
/usr/include/c++/4.0.2/bits/ostream.tcc:680: instantiated from here
/usr/include/c++/4.0.2/ostream:64: error: no type named ‘off_type’ in ‘struct std::char_traits<char>’
/usr/include/c++/4.0.2/bits/ostream.tcc:451: error: no type named ‘off_type’ in ‘struct std::char_traits<char>’
/usr/include/c++/4.0.2/ostream: In instantiation of ‘std::basic_ostream<wchar_t, std::char_traits<wchar_t> >’:
/usr/include/c++/4.0.2/bits/ostream.tcc:692: instantiated from here
/usr/include/c++/4.0.2/ostream:62: error: no type named ‘int_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/ostream:64: error: no type named ‘off_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/bits/ostream.tcc:451: error: no type named ‘off_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream: In instantiation of ‘std::basic_istream<char, std::char_traits<char> >’:
/usr/include/c++/4.0.2/istream:580: instantiated from here
/usr/include/c++/4.0.2/istream:65: error: no type named ‘off_type’ in ‘struct std::char_traits<char>’
/usr/include/c++/4.0.2/istream:569: error: no type named ‘off_type’ in ‘struct std::char_traits<char>’
/usr/include/c++/4.0.2/istream: In instantiation of ‘std::basic_istream<wchar_t, std::char_traits<wchar_t> >’:
/usr/include/c++/4.0.2/istream:596: instantiated from here
/usr/include/c++/4.0.2/istream:63: error: no type named ‘int_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream:65: error: no type named ‘off_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream:272: error: no type named ‘int_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream:427: error: no type named ‘int_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream:438: error: no type named ‘int_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream:569: error: no type named ‘off_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream: In instantiation of ‘std::basic_iostream<char, std::char_traits<char> >’:
/usr/include/c++/4.0.2/bits/istream.tcc:1273: instantiated from here
/usr/include/c++/4.0.2/istream:757: error: no type named ‘off_type’ in ‘struct std::char_traits<char>’
/usr/include/c++/4.0.2/istream: In instantiation of ‘std::basic_istream<wchar_t, std::char_traits<wchar_t> >::sentry’:
/usr/include/c++/4.0.2/bits/istream.tcc:1276: instantiated from here
/usr/include/c++/4.0.2/istream:630: error: no type named ‘int_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream: In instantiation of ‘std::basic_iostream<wchar_t, std::char_traits<wchar_t> >’:
/usr/include/c++/4.0.2/bits/istream.tcc:1281: instantiated from here
/usr/include/c++/4.0.2/istream:755: error: no type named ‘int_type’ in ‘struct std::char_traits<wchar_t>’
/usr/include/c++/4.0.2/istream:757: error: no type named ‘off_type’ in ‘struct std::char_traits<wchar_t>’
james@ubuntu:~$
Ehrm...Help?