Mucke
07-03-2004, 16:19
hi,
hab da echt ein Problem, vielleicht sehe ich die Lösung auch nicht,
aber irgendwie weigert sich der gcc folgenden code zu compilieren.
#include <iostream>
using namespace std;
int main()
{
cout << "Hallo World!";
return 0;
}
ich versuche es mit:
"gcc -Wall test.cpp -o test" zu kompiliern, aber er bringt mir folgende Meldung.
/tmp/cc5sgM5U.o(.text+0x19): In function `main':
: undefined reference to `std::cout'
/tmp/cc5sgM5U.o(.text+0x1e): In function `main':
: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/cc5sgM5U.o(.text+0x4a): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `std::ios_base::Init::Init[in-charge]()'
/tmp/cc5sgM5U.o(.text+0x79): In function `__tcf_0':
: undefined reference to `std::ios_base::Init::~Init [in-charge]()'
/tmp/cc5sgM5U.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
meine gcc version ist: gcc-Version 3.3.2 20031022 (Red Hat Linux 3.3.2-1)
ideen?
K, hat sich erledigt, mit g++ klappts ;)
hab da echt ein Problem, vielleicht sehe ich die Lösung auch nicht,
aber irgendwie weigert sich der gcc folgenden code zu compilieren.
#include <iostream>
using namespace std;
int main()
{
cout << "Hallo World!";
return 0;
}
ich versuche es mit:
"gcc -Wall test.cpp -o test" zu kompiliern, aber er bringt mir folgende Meldung.
/tmp/cc5sgM5U.o(.text+0x19): In function `main':
: undefined reference to `std::cout'
/tmp/cc5sgM5U.o(.text+0x1e): In function `main':
: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/cc5sgM5U.o(.text+0x4a): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `std::ios_base::Init::Init[in-charge]()'
/tmp/cc5sgM5U.o(.text+0x79): In function `__tcf_0':
: undefined reference to `std::ios_base::Init::~Init [in-charge]()'
/tmp/cc5sgM5U.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
meine gcc version ist: gcc-Version 3.3.2 20031022 (Red Hat Linux 3.3.2-1)
ideen?
K, hat sich erledigt, mit g++ klappts ;)