[C++] Clang fails to compile hello world in C++

I have just compiled a simple hello world program using g++, g++ -o hello hello.cpp. I attempted to use the same command but invoking Clang as this is the new C++ compiler and it gives more helpful error messages. However, it outputs a stream of undefined reference messages. I can't reproduce them as my FreeBSD machine is not online. Why is this? Do I need to do special configuration to make Clang work?
 
You might want to show more specifically what you did and what errors you got. The following works fine for me:
Code:
% cat > neilms.cc
#include <iostream>
using namespace std;

int
main(int argc,char **argv)
{
  cout << "Hello, world!" << endl;
  return 0;
}^D
% clang++ neilms.cc
% ./a.out
Hello, world!
 
Back
Top