<p>the answer is the position of the option -l<br>
user@UbuntuPC:~/Desktop$ g++ -std=c++11  main.cpp -lmlpack</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/631#issuecomment-215686192">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFK0cca4aE58RwL9eIVCY0--ZEIFrks5p8eeogaJpZM4ISEv9.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/issues/631#issuecomment-215686192"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>