title: Libusb and how to use its packages in Ubuntu
body: <p>I have installed libusb by using the following command. I am not sure if it was right or not and the command was</p>
  
  <pre><code>sudo apt-get install libusb-dev
  </code></pre>
  
  <p>Once I have installed (and I am not sure if it has installed or not because I am a novice user of Ubuntu), I want to know how would I use the library, because I write some sample code which uses &lt;libusb.h>, but when I compile that C++ file using</p>
  
  <pre><code>g++ test_libusb.cpp
  </code></pre>
  
  <p>that throws the following error,</p>
  
  <blockquote>
    <p>test_libusb.cpp:2:20: fatal error: libusb.h: No such file or directory compilation terminated.</p>
  </blockquote>
  
  <p>I am clueless what to do. I can't find any source on the Internet to get to the bottom of this...</p>
  
  <p>I want to know two things here:</p>
  
  <ol>
  <li>How do I add the libusb library in C/C++ so I can use &lt;libusb.h>?</li>
  <li>What would some sample code be? Only a few lines to see if libusb is working...</li>
  </ol>