clang fails to compile simple c++ with "ld: symbol(s) not found for architecture x86_64" [closed]

$ clang++ -o test test.cpp works as expected, don't forget to use clang++ for C++