gcc hallo2.cpp
/tmp/ccN1KHjT.o: In function `__static_initialization_and_destruction_0(int, int)':
hallo2.cpp
.text+0x23): undefined reference to `std::ios_base::Init::Init()'
/tmp/ccN1KHjT.o: In function `__tcf_0':
hallo2.cpp
.text+0x6c): undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccN1KHjT.o: In function `main':
hallo2.cpp
.text+0x8e): undefined reference to `std::cout'
hallo2.cpp
.text+0x93): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std:
perator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/ccN1KHjT.o
.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status