title: Clang compiler error for very simple program
body: <p>I'm trying to get started with c++. I'm on a mac with Mavericks OS installed.</p>
  
  <p>The program I'm trying to compile is:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  int main()
  {
      std::cout &lt;&lt; "Enter two numbers:" &lt;&lt; std::endl;
  
      return 0;
  }
  </code></pre>
  
  <p>Here is the version of cc:</p>
  
  <pre><code>Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
  Target: x86_64-apple-darwin13.0.0
  Thread model: posix
  </code></pre>
  
  <p>However, when I try to compile:</p>
  
  <pre><code>cc test.cc
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>...
  std::__1::basic_ostream&lt;char, std::__1::char_traits&lt;char&gt; &gt;&amp; std::__1::operator&lt;&lt;&lt;std::__1::char_traits&lt;char&gt; &gt;(std::__1::basic_ostream&lt;char, std::__1::char_traits&lt;char&gt; &gt;&amp;, char const*) in test-AeQQK5.o
    ___clang_call_terminate in test-AeQQK5.o
  "___cxa_end_catch", referenced from:
  std::__1::basic_ostream&lt;char, std::__1::char_traits&lt;char&gt; &gt;&amp; std::__1::operator&lt;&lt;&lt;std::__1::char_traits&lt;char&gt; &gt;(std::__1::basic_ostream&lt;char, std::__1::char_traits&lt;char&gt; &gt;&amp;, char const*) in test-AeQQK5.o
  "___gxx_personality_v0", referenced from:
    std::__1::basic_ostream&lt;char, std::__1::char_traits&lt;char&gt; &gt;&amp; std::__1::operator&lt;&lt;&lt;std::__1::char_traits&lt;char&gt; &gt;(std::__1::basic_ostream&lt;char, std::__1::char_traits&lt;char&gt; &gt;&amp;, char const*) in test-AeQQK5.o
    std::__1::ostreambuf_iterator&lt;char, std::__1::char_traits&lt;char&gt; &gt; std::__1::__pad_and_output&lt;char, std::__1::char_traits&lt;char&gt; &gt;(std::__1::ostreambuf_iterator&lt;char, std::__1::char_traits&lt;char&gt; &gt;, char const*, char const*, char const*, std::__1::ios_base&amp;, char) in test-AeQQK5.o
    Dwarf Exception Unwind Info (__eh_frame) in test-AeQQK5.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>What am I doing wrong?</p>