The library is engineered in such a way that it can be easily and quickly ported to other operating systems. Those of you who want to port libusb to a specific OS, should take a look at the PORTING file found inside the source archive. Building and installing the libusb library is an easy task, as described in the next section.
Getting started with libusb
To compile, install and use the libusb library on your projects under a GNU/Linux operating systems, first download the latest version of the software from Softpedia or via its official website (see link at the end of the article), save the archive somewhere on your computer, extract it and open your favorite terminal emulator application.
Use the ‘cd’ command to navigate to the location of the extracted archive files (e.g. cd /home/softpedia/libusb-1.0.19) and type the ‘sh autogen.sh’ command to configure the project, as well as to generate the ‘configure’ script, which can be used to optimize the program for your hardware architecture or enable various options (see the ‘./configure --help’ command for details).
If you choose not to optimize/re-configure the program, simply type the ‘make’ command to compile it. After a successful compilation, which shouldn’t take more than a few seconds, you can install libusb system wide by executing the ‘sudo make install’ command as a privileged user or the ‘make install’ command as root. You can now integrate it into your own application, so it can access USB devices.
Reviewed by Marius Nestor, last updated on November 25th, 2014
In a hurry? Add it to your Download Basket!
- Add support for USB bulk streams on Linux and Mac OS X (#11)
- Windows: Add AMD and Intel USB-3.0 root hub support
- Windows: Fix USB 3.0 speed detection on Windows 8 or later (#10)
- Added Russian translation for libusb_strerror strings
Application descriptionlibusb is the world's most popular and used open source library software for accessing USB devices from within an...