Hallo,
ich habe das Schemata "Grundlegende Enwticklungsumgebung" installiert und dachte, ich könnte nun munter drauf los programmieren.
Leider laufe ich schon bei dem einfachen "Hello World" in ein Problem. Für das Programm:
führt der einfache Aufruf
zu einer Unmenge von Fehlermeldungen:
Was mache ich falsch? Ich bin eigentlich immer davon ausgegangen, dass so einfache Programme ohne weitere Konfiguration zu schreiben sind.
[Edit:] Mein System: openSUSE 11.0 x86_64
ich habe das Schemata "Grundlegende Enwticklungsumgebung" installiert und dachte, ich könnte nun munter drauf los programmieren.
Leider laufe ich schon bei dem einfachen "Hello World" in ein Problem. Für das Programm:
Code:
#include <iostream>
#include <ostream>
int main()
{
std::cout << "Hallo Welt!" << std::endl;
}
Code:
g++ helloworld.cpp
Code:
In file included from helloworld.cpp:1:
/usr/include/c++/4.3/iostream:44:28: error: bits/c++config.h: Datei oder Verzeichnis nicht gefunden
In file included from /usr/include/c++/4.3/cwchar:49,
from /usr/include/c++/4.3/bits/postypes.h:47,
from /usr/include/c++/4.3/iosfwd:47,
from /usr/include/c++/4.3/ios:44,
from /usr/include/c++/4.3/ostream:45,
from /usr/include/c++/4.3/iostream:45,
from helloworld.cpp:1:
/usr/include/c++/4.3/cstddef:48:25: error: stddef.h: Datei oder Verzeichnis nicht gefunden
In file included from /usr/include/features.h:354,
from /usr/include/stdio.h:28,
from /usr/include/c++/4.3/cstdio:50,
from /usr/include/c++/4.3/bits/char_traits.h:48,
from /usr/include/c++/4.3/ios:46,
from /usr/include/c++/4.3/ostream:45,
from /usr/include/c++/4.3/iostream:45,
from helloworld.cpp:1:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: Datei oder Verzeichnis nicht gefunden
In file included from /usr/include/c++/4.3/cstdio:50,
from /usr/include/c++/4.3/bits/char_traits.h:48,
from /usr/include/c++/4.3/ios:46,
from /usr/include/c++/4.3/ostream:45,
from /usr/include/c++/4.3/iostream:45,
from helloworld.cpp:1:
/usr/include/stdio.h:34:21: error: stddef.h: Datei oder Verzeichnis nicht gefunden
In file included from /usr/include/stdio.h:75,
from /usr/include/c++/4.3/cstdio:50,
from /usr/include/c++/4.3/bits/char_traits.h:48,
from /usr/include/c++/4.3/ios:46,
from /usr/include/c++/4.3/ostream:45,
from /usr/include/c++/4.3/iostream:45,
from helloworld.cpp:1:
/usr/include/libio.h:53:21: error: stdarg.h: Datei oder Verzeichnis nicht gefunden
In file included from /usr/include/c++/4.3/ios:47,
from /usr/include/c++/4.3/ostream:45,
from /usr/include/c++/4.3/iostream:45,
from helloworld.cpp:1:
/usr/include/c++/4.3/bits/localefwd.h:47:76: error: bits/c++locale.h: Datei oder Verzeichnis nicht gefunden
In file included from /usr/include/c++/4.3/bits/ios_base.h:46,
from /usr/include/c++/4.3/ios:48,
from /usr/include/c++/4.3/ostream:45,
from /usr/include/c++/4.3/iostream:45,
from helloworld.cpp:1:
/usr/include/c++/4.3/ext/atomicity.h:39:23: error: bits/gthr.h: Datei oder Verzeichnis nicht gefunden
/usr/include/c++/4.3/ext/atomicity.h:40:30: error: bits/atomic_word.h: Datei oder Verzeichnis nicht gefunden
In file included from /usr/include/c++/4.3/string:48,
from /usr/include/c++/4.3/bits/locale_classes.h:47,
from /usr/include/c++/4.3/bits/ios_base.h:48,
from /usr/include/c++/4.3/ios:48,
from /usr/include/c++/4.3/ostream:45,
from /usr/include/c++/4.3/iostream:45,
from helloworld.cpp:1:
/usr/include/c++/4.3/bits/allocator.h:53:31: error: bits/c++allocator.h: Datei oder Verzeichnis nicht gefunden
In file included from /usr/include/c++/4.3/bits/basic_ios.h:44,
from /usr/include/c++/4.3/ios:50,
from /usr/include/c++/4.3/ostream:45,
from /usr/include/c++/4.3/iostream:45,
from helloworld.cpp:1:
/usr/include/c++/4.3/bits/locale_facets.h:48:30: error: bits/ctype_base.h: Datei oder Verzeichnis nicht gefunden
/usr/include/c++/4.3/bits/locale_facets.h:1559:31: error: bits/ctype_inline.h: Datei oder Verzeichnis nicht gefunden
In file included from /usr/include/c++/4.3/iosfwd:46,
from /usr/include/c++/4.3/ios:44,
from /usr/include/c++/4.3/ostream:45,
from /usr/include/c++/4.3/iostream:45,
from helloworld.cpp:1:
/usr/include/c++/4.3/bits/stringfwd.h:46: error: expected constructor, destructor, or type conversion before ‘(’ token
/usr/include/c++/4.3/bits/stringfwd.h:55: error: expected type-specifier before ‘allocator’
/usr/include/c++/4.3/bits/stringfwd.h:55: error: expected ‘>’ before ‘allocator’
/usr/include/c++/4.3/bits/stringfwd.h:60: error: template argument 3 is invalid
/usr/include/c++/4.3/bits/stringfwd.h:60: error: invalid type in declaration before ‘;’ token
/usr/include/c++/4.3/bits/stringfwd.h:68: error: ‘_GLIBCXX_END_NAMESPACE’ does not name a type
In file included from /usr/include/c++/4.3/cwchar:49,
from /usr/include/c++/4.3/bits/postypes.h:47,
from /usr/include/c++/4.3/iosfwd:47,
from /usr/include/c++/4.3/ios:44,
from /usr/include/c++/4.3/ostream:45,
from /usr/include/c++/4.3/iostream:45,
from helloworld.cpp:1:
/usr/include/c++/4.3/cstddef:56: error: ‘::size_t’ has not been declared
In file included from /usr/include/c++/4.3/bits/postypes.h:47,
from /usr/include/c++/4.3/iosfwd:47,
from /usr/include/c++/4.3/ios:44,
from /usr/include/c++/4.3/ostream:45,
from /usr/include/c++/4.3/iostream:45,
from helloworld.cpp:1:
/usr/include/c++/4.3/cwchar:61: error: expected constructor, destructor, or type conversion before ‘extern’
In file included from /usr/include/c++/4.3/ios:45,
from /usr/include/c++/4.3/ostream:45,
from /usr/include/c++/4.3/iostream:45,
from helloworld.cpp:1:
/usr/include/c++/4.3/exception:40: error: expected declaration before end of line
[Edit:] Mein System: openSUSE 11.0 x86_64