title: Instruct GCC to link as C++
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1001535/linking-c-code-with-gcc-without-g">Linking C++ code with &#39;gcc&#39; (without g++)</a>  </p>
  </blockquote>
  
  
  
  <p>GCC provides the <code>-x lang</code> option, which allows you to modify the assumed language during compilation. What is the equivalent for the link step? I wish to link a program that has C++ dependencies via the <code>gcc</code> command.</p>