title: /usr/bin/ld: cannot find -lstdc++ for Ubuntu while trying to "swift build" Perfect2 project
body: <h2>Description:</h2>
  
  <p>I've followed the installation steps for <a href="https://swift.org/download/#using-downloads" rel="nofollow noreferrer">Swift3</a> and <a href="https://github.com/PerfectlySoft/PerfectDocs/blob/master/guide/gettingStarted.md" rel="nofollow noreferrer">Perfect2</a>
  and I've cloned the <a href="https://github.com/PerfectlySoft/PerfectTemplate" rel="nofollow noreferrer">PerfectTemplate</a> test project proposed by Perfect and I've tried <code>swift build</code></p>
  
  <h2>Error Message:</h2>
  
  <blockquote>
    <p>warning: minimum recommended clang is version 3.6, otherwise you may
    encounter linker errors. Linking ./.build/debug/PerfectTemplate
    /usr/bin/ld: cannot find -lstdc++ clang: error: linker command failed
    with exit code 1 (use -v to see invocation) :0: error: link
    command failed with exit code 1 (use -v to see invocation)
    :0: error: build had 1 command failures error: exit(1):
    /etc/swift301/usr/bin/swift-build-tool -f
    /home/XXXX/ClionProjects/PerfectTemplate/.build/debug.yaml</p>
  </blockquote>
  
  <h2>What I've tried:</h2>
  
  <p>I've gone on different SO questions that seemed similar but all on different projects and attempted to try their solutions without luck:</p>
  
  <p>For example:</p>
  
  <p><a href="https://stackoverflow.com/questions/13195110/usr-bin-ld-cannot-find-lstdc">Matlab Kalman /usr/bin/ld: cannot find -lstdc++</a></p>
  
  <p>I also noticed the warning coming from the clang version, I am aware that my current version is 3.4, but that is what was installed via <code>sudo apt-get install clang</code> as mentioned in the documentation.</p>
  
  <p>I've also tried installing the 3.6 version of clang with: <code>sudo apt-get install clang-3.n</code></p>
  
  <p>However, after when I try <code>swift build</code> again I get the following error:</p>
  
  <blockquote>
    <p>error: invalid inferred toolchain: could not find <code>clang</code></p>
  </blockquote>
  
  <h2>Question:</h2>
  
  <p>How do I get rid of the <code>/usr/bin/ld: cannot find -lstdc++</code> error, so I can build the PerfectTemplate project?</p>