I have installed libusb by using the following command. I am not sure if it was right or not and the command was
sudo apt-get install libusb-dev
Once I have installed (and I am not sure if it has installed or not because I am a novice user of Ubuntu), I want to know how would I use the library, because I write some sample code which uses <libusb.h>, but when I compile that C++ file using
g++ test_libusb.cpp
that throws the following error,
test_libusb.cpp:2:20: fatal error: libusb.h: No such file or directory compilation terminated.
I am clueless what to do. I can't find any source on the Internet to get to the bottom of this...
I want to know two things here:
Have a look at http://packages.debian.org/wheezy/i386/libusb-dev/filelist: The file you want to include is usb.h
. Also, you'll have to tell the compiler where it can find the compiled library functions: Add -lusb
to the compiler command line to make it load libusb.so
.