title: How to compile with -lusb
body: <p>Can anyone help me how to compile code below. They say "compile with -lusb". I dont know how to do it. forgive my stupidity :D</p>
  
  <pre><code> #include &lt;stdio.h&gt;
  #include &lt;usb.h&gt;
  main(){
  struct usb_bus *bus;
  struct usb_device *dev;
  usb_init();
  usb_find_busses();
  usb_find_devices();
  for (bus = usb_busses; bus; bus = bus-&gt;next)
      for (dev = bus-&gt;devices; dev; dev = dev-&gt;next){
          printf("Trying device %s/%s\n", bus-&gt;dirname, dev-&gt;filename);
          printf("\tID_VENDOR = 0x%04x\n", dev-&gt;descriptor.idVendor);
          printf("\tID_PRODUCT = 0x%04x\n", dev-&gt;descriptor.idProduct);
      }
   }
  </code></pre>