Libusb installation and compilation, libusb Compilation
Overview
The usb driver development on the Linux platform mainly includes kernel driver development and libusb-based non-drive design. Libusb is a C library that provides universal access to USB devices. It is used to control the access to a non-drive USB device.
Supported platforms
Linux, OS X, Windows, Windows CE, Android, OpenBSD
Official documentation
Http://libusb.info/
Code path
Https://github.com/libusb/libusb
Dependent Library
Libudev-dev
Debian compilation and Installation Process
1. First download the source code from github. Or download the zip package and decompress it to the local directory.
Git clone https://github.com/libusb/libusb.git
2. to install this library, you must rely on the autoreconf tool. Therefore, check whether autoreconf is installed before execution.
Which autoreconf
Run the following command to install the autoreconf tool.
Apt-get install dh-autoreconf
3. After the installation is successful, run the./autogen. sh script directly.
Some uninstalled dependent libraries, such as the libudev library, are prompted during script execution. If the script reports an error and exits, follow the error
Error message: install the required dependent library.
Apt-get install libudev-dev
4. Execute make directly in the libusb directory. Wait until compilation is completed.
5. After compilation, enter libusb/. libs/to generate the libusb-1.0.a and libusb-1.0.so.0.1.0 file.