title: Default linker setting in Makefile for linking C++ object files
body: <p>Consider this <code>Makefile</code></p>
  
  <pre><code>% cat Makefile
  main: main.o add.o
  </code></pre>
  
  <p>which uses <code>cc</code> instead of <code>g++</code> to link the object files</p>
  
  <pre><code>% make
  g++ -Wall -pedantic -std=c++0x   -c -o main.o main.cpp
  g++ -Wall -pedantic -std=c++0x   -c -o add.o add.cpp
  cc   main.o add.o   -o main
  main.o:main.cpp:(.text+0x40): undefined reference to `std::cout'
  ...
  </code></pre>
  
  <p>How do I tell (GNU) Make to use <code>g++</code> (which links the C++ libraries) instead of <code>cc</code>?</p>