undefined reference to boost::program_options in xubuntu
<p>I have this file</p>

<pre><code>#include &lt;boost/program_options.hpp&gt;
namespace po = boost::program_options;

#include &lt;iostream&gt;
using namespace std;

int main(int ac, char* av[])
{
    try {

    po::options_description desc("Allowed options");
        desc.add_options()
            ("help", "produce help message")
        ;

    }
    catch(exception&amp; e) {
        cerr &lt;&lt; "error: " &lt;&lt; e.what() &lt;&lt; "\n";
        return 1;
    }
    catch(...) {
        cerr &lt;&lt; "Exception of unknown type!\n";
    }

    return 0;
}
</code></pre>

<p>Now I am trying to compile like this: </p>

<blockquote>
  <p>g++ -I /usr/include/boost/ -I /usr/include/boost/program_options
  main.cpp -L /usr/lib/x86_64-linux-gnu/ -lboost_program_options</p>
</blockquote>

<p>and I am receiving this</p>

<blockquote>
  <p>undefined reference to
  `boost::program_options::options_description::options_description(std::__cxx11::basic_string, std::allocator > const&amp;, unsigned int,
  unsigned int)'</p>
</blockquote>

<p>I don't know why it is failing, the library is there and the header file too. What goes wrong? I am using boost 1.55.0</p>

<pre><code>administrator@administrator-VirtualBox:~/l/b$ sudo updatedb
administrator@administrator-VirtualBox:~/l/b$ locate libboost_program_options
/usr/lib/x86_64-linux-gnu/libboost_program_options.a
/usr/lib/x86_64-linux-gnu/libboost_program_options.so
/usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.55.0
</code></pre>