usb c++ programming question

Asked by deadcricket on 2008-02-26

This might be out of the scope of these forums, but I'm doing some programming in C++ using libusb, and also trying to use functions like usb_alloc_urb, usb_free_urb, etc to complete some data transfers across USB. But, when I compile using g++ and, even including the -lusb option for including the usb library, I'm getting "was not declared in this scope" error for the above functions.

Looking into things, it seems I'm missing a header file in the usr/include/linux directory where these functions defined, specifically usb.h (which is different than the usr/include/usb.h). I'm curious if I'm missing a package I should install (having looked through the package manager, I'm not finding where that might be), but since some of the include files in the linux directory are renamed, if perhaps I'm just missing where the correct, already installed, header file is at.

Any help would be appreciated.

Question information

English Edit question
Ubuntu knetworkmanager Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
deadcricket (vector-monkey) said : #1

Forgot to mention: using Ubuntu 7.10 Gutsy Gibbon which is running the 2.6.22-14-generic linux distro.

Do you have build-essential installed?

deadcricket (vector-monkey) said : #3

Sorry, should have added that to the info. I do have build-essential installed.

deadcricket (vector-monkey) said : #4

I'm going to use a different distribution of Linux. Although Ubuntu is nice, it seems it doesn't fit my needs.