Hallo,
ich habe nach der Installation von GNU C++ 3.3.1-24 unter SUSE Linux
Professional 9.0 erste Programmier-Versuche gestartet. Dabei tritt
folgendes Problem mit <iostream> auf:
Source:
//#include
//#include <cstdio>
#include <iostream>
using namespace std;
class A;
class A
{
public:
int lng;
char *p;
};
int main(void)
{
// A array[10];
// std::printf("Hallo World\n");
std::cerr << "Hallo World";
return 0;
}
Kommando:
ghinkofer@linux:~/temp> cc main.cpp
Ergebnis:
/tmp/cc5q33fj.o(.text+0x19): In function `main':
: undefined reference to `std::cerr'
/tmp/cc5q33fj.o(.text+0x1e): In function `main':
: undefined reference to `std::basic_ostream& std::operator<<
(std::basic_ostream&, char const*)'
/tmp/cc5q33fj.o(.text+0x4a): In function
`__static_initialization_and_destruction_0(int, int)':
: undefined reference to `std::ios_base::Init::Init[in-charge]()'
/tmp/cc5q33fj.o(.text+0x79): In function `__tcf_0':
: undefined reference to `std::ios_base::Init::~Init [in-charge]()'
/tmp/cc5q33fj.o(.eh_frame+0x11): undefined reference to
`__gxx_personality_v0'
collect2: ld returned 1 exit status
ghinkofer@linux:~/temp>
Hat jemand eine Idee, wo das Problem liegt?
This email is confidential. If you are not the intended recipient, you
must not disclose or use the information contained in it. If you have
received tis mail in error, please tell us immediatly by return email
and delete the document.