Hi all,
I'm getting the following error messages when gcc links hello.cpp. Does anybody know what's wrong?
Thanks,
Andre
************************************************** *********
hello.cpp :
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world\n";
return 0;
}
************************************************** *********
Error messages:
$ gcc ./hello.cpp
/tmp/ccLP9XEQ.o: In function `__static_initialization_and_destruction_0(int, int)':singleton.cpp

.text+0x23): undefined reference to `std::ios_base::Init::Init()'
/tmp/ccLP9XEQ.o: In function `__tcf_0':singleton.cpp

.text+0x6c): undefined reference to std::ios_base::Init::~Init()'
/tmp/ccLP9XEQ.o: In function `main':singleton.cpp

.text+0x8e): undefined reference to `std::cout'
:singleton.cpp

.text+0x93): 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/ccLP9XEQ.o

.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status