gcc test.cpp -o test /tmp/ccynJPMN.o(.text+0x19): In function `main': : undefined reference to `std::cout' /tmp/ccynJPMN.o(.text+0x1e): In function `main': : undefined reference to `std::basic_ostream >& std::operator<< >(std::basic_ostream >&, char const*)' /tmp/ccynJPMN.o(.text+0x4a): In function `__static_initialization_and_destruction_0(int, int)': : undefined reference to `std::ios_base::Init::Init[in-charge]()' /tmp/ccynJPMN.o(.text+0x79): In function `__tcf_0': : undefined reference to `std::ios_base::Init::~Init [in-charge]()' /tmp/ccynJPMN.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status