title: Using Clang++ in Makefile in place of G++
body: <p>I have a makefile that builds my project just fine with g++ 4.6.</p>
  
  <pre><code>#specify the compiler  
  GXX=g++ -std=c++0x
  
  # Specifiy the target  
  all: linkedList
  
  # Specify the object files that the target depends on  
  # Also specify the object files needed to create the executable  
  linkedList: StudentRecord.o Node.o LinkedList.o  ListMain.o
      $(GXX) StudentRecord.o Node.o LinkedList.o  ListMain.o -o linkedList
  
  # Specify how the object files should be created from source files  
  LinkedList.o: LinkedList.cpp
      $(GXX)  -c  LinkedList.cpp
  
  ListMain.o: ListMain.cpp
      $(GXX)  -c  ListMain.cpp
  
  StudentRecord.o: StudentRecord.cpp
      $(GXX)  -c  StudentRecord.cpp
  
  Node.o: Node.cpp
      $(GXX)  -c  Node.cpp
  </code></pre>
  
  <p>When I change the first line to be <code>GXX = clang++ -std=c++0x</code> clang throws some rather dense error about iostream not finding the correct args or something along with many other errors after that (but this is the "root" error).</p>
  
  <pre><code>In file included from /usr/include/c++/4.6/iostream:39:
  In file included from /usr/include/c++/4.6/ostream:39:
  In file included from /usr/include/c++/4.6/ios:40:
  In file included from /usr/include/c++/4.6/bits/char_traits.h:40:
  In file included from /usr/include/c++/4.6/bits/stl_algobase.h:65:
  In file included from /usr/include/c++/4.6/bits/stl_pair.h:60:
  In file included from /usr/include/c++/4.6/bits/move.h:53:
  /usr/include/c++/4.6/type_traits:630:59: error: '_Tp' does not refer to a value
      : public integral_constant&lt;bool, __is_standard_layout(_Tp)&gt;
  </code></pre>
  
  <p>Is this a problem with my makefile, or is could there really be a difference in this simple compilation?</p>
  
  <p>Using clang 2.9.</p>
  
  <p><strong>Note:</strong> The line that clang is complaining about is <code>#include &lt;iostream&gt;</code></p>