I'm a newbie in libusb c programming. Should I know the difference between libusb.h and usb.h? I have installed both of them in Ubuntu(xenial) with package libusb-1.0-0-dev and libusb-dev. Which one is better? Are they from the same origin libusb.info?
Thanks,
The libusb library has onetime switched from version 0.1 to version 1.0, breaking compatibility.
usb.h - is a header for libusb 0.1, the older one.
libusb.h - is a header for libusb 1.0, the newer one.
Correspondingly, libusb-dev is based on version 0.1 and provides the former header. libusb-1.0-0-dev is based on version 1.0 and provides the latter header.
You should choose the one depending on your needs, but generally for new development you should choose the newer one, libusb-1.0 and libusb.h header.
Also, there is the libusb-compat-0.1 library, which provides the compatibility layer for binaries written for libusb-0.1 to be run in environment with libusb-1.0. The libusb-compat-0.1 also provides the usb.h header.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With