Перенес ваш исправленный код и получил
$ clang 2.cpp
/tmp/2-fb6137.o: In function `main':
2.cpp:(.text+0x1d): undefined reference to `operator new[](unsigned int)'
2.cpp:(.text+0x67): undefined reference to `std::cout'
2.cpp:(.text+0x79): 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*)'
2.cpp:(.text+0x88): undefined reference to `std::ostream::operator<<(int)'
2.cpp:(.text+0x9a): 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*)'
2.cpp:(.text+0xb3): undefined reference to `std::ostream::operator<<(double)'
2.cpp:(.text+0xb9): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
2.cpp:(.text+0xc5): undefined reference to `std::ostream::operator<<(std::ostream& (*)(std::ostream&))'
2.cpp:(.text+0xe5): undefined reference to `operator delete[](void*)'
/tmp/2-fb6137.o: In function `__cxx_global_var_init':
2.cpp:(.text.startup+0x10): undefined reference to `std::ios_base::Init::Init()'
2.cpp:(.text.startup+0x16): undefined reference to `std::ios_base::Init::~Init()'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[/font][/size]