$ cc test.cpp /tmp/test-0a9466.o: In function `main': test.cpp:(.text+0x66): undefined reference to `vtable for std::__1::ios_base' test.cpp:(.text+0x6c): undefined reference to `vtable for std::__1::basic_ios<char, std::__1::char_traits<char> >' test.cpp:(.text+0xfc): undefined reference to `std::__1::ios_base::init(void*)' test.cpp:(.text+0x1d6): undefined reference to `std::__1::ios_base::clear(unsigned int)' test.cpp:(.text+0x23f): undefined reference to `std::__1::basic_istream<char, std::__1::char_traits<char> >::~basic_istream()' test.cpp:(.text+0x25b): undefined reference to `std::__1::basic_ios<char, std::__1::char_traits<char> >::~basic_ios()' test.cpp:(.text+0x2e3): undefined reference to `std::__1::cout' test.cpp:(.text+0x395): undefined reference to `std::__1::basic_istream<char, std::__1::char_traits<char> >::read(char*, int)' test.cpp:(.text+0x422): undefined reference to `std::__1::cout' test.cpp:(.text+0x444): undefined reference to `std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(int)'