Kompilovanie Hello, world!

Sekcia: Programovanie 16.07.2007 | 14:32
Avatar YellowZelo   Používateľ
Snažím sa skompilovať jednoduchy Hello, world! v c++, ale vypise mi iba:

/home/martin/tmp/cccp6sQq.o: In function `main':
hello.cpp: (.text+0x25): undefined reference to `std::cout'
hello.cpp: (.text+0x2a): 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*)'
hello.cpp: (.text+0x35): undefined reference to `std::cin'
hello.cpp: (.text+0x3a): undefined reference to `std::basic_istream<char, std::char_traits<char> >::get()'

/home/martin/tmp/cccp6sQq.o: In function `__tcf_0':
hello.cpp: (.text+0x57): undefined reference to `std::ios_base::Init::~Init()'

/home/martin/tmp/cccp6sQq.o: In function `__static_initialization_and_destruction_0(int, int)':
hello.cpp: (.text+0x84): undefined reference to `std::ios_base::Init::Init()'

/home/martin/tmp/cccp6sQq.o: (.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status


Veľmi tomu nerozmumiem, čo s tým, aby to skompilovalo?

Vďaka.