I am trying to compile the example libusb.c provided by libusb package (if you dl the source code.)
It doesn\'t work to say the least.
#include
Just en explanation why your attempt to replace libusb/libusb.h with usb.h fails: usb.h is a header from linux-headers, not from libusb-dev. You need #include <libusb.h> instead.
This is what I had to do on Debian. It should be at least similar in Ubuntu.
Install libusb-1.0-0-dev
Instead of:
#include <libusb/libusb.h>
do:
#include <libusb.h>
Compile with:
gcc example.c `pkg-config --libs --cflags libusb-1.0`