LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ubuntu 9.10 - #include <libusb/libusb.h> (http://www.linuxquestions.org/questions/linux-newbie-8/ubuntu-9-10-include-libusb-libusb-h-802880/)

stonehinge03 04-19-2010 12:29 PM

ubuntu 9.10 - #include <libusb/libusb.h>
 
Not able to do that simple include; gives this error:
"error: libusb/libusb.h: No such file or directory"

These are the packages I've installed:
Code:


dpkg --list |grep usb
ii  libusb-0.1-4                              2:0.1.12-13                        userspace USB programming library
ii  libusb-dev                                2:0.1.12-13                        userspace USB programming library developmen
ii  python-usb                                0.4.1-4ubuntu1                    USB interface for Python
ii  qc-usb-utils                              0.6.6-6ubuntu2                    utility programs for the QuickCam Express dr
ii  usb-creator                                0.1.16                            Ubuntu USB desktop image creator
ii  usbutils                                  0.73-8ubuntu3                      Linux USB utilities
ii  xserver-xorg-video-sisusb                  1:0.9.0-4                          X.Org X server -- SiS USB display driver


Tinkster 04-19-2010 01:57 PM

Ummm ... and where's the rest of the information?

What are you trying to compile?
How do you invoke gcc, what are your parameters for -I?

I don't use *buntu, so can't say what's part of libusb-dev,
but I'd assume the header is; if you do a
Code:

sudo updatedb && locate libusb.h
- what do you get?


Cheers,
Tink

knudfl 04-19-2010 03:06 PM

dpkg -L libusb-dev
/usr/bin/libusb-config
/usr/include/usb.h
/usr/lib/libusb.so
/usr/lib/pkgconfig/libusb.pc
-------------------

#include <libusb/libusb.h> : Is wrong.

#include <libusb.h> : Will usually work.
EDIT → → #include <usb.h> : Sorry, typo in the above.
.....

Tinkster 04-19-2010 03:09 PM

Quote:

Originally Posted by knudfl (Post 3940627)
dpkg -L libusb-dev
/usr/bin/libusb-config
/usr/include/usb.h
/usr/lib/libusb.so
/usr/lib/pkgconfig/libusb.pc
-------------------

#include <libusb/libusb.h> : Is wrong.

#include <libusb.h> : Will probably work.

.....

I actually don't see a libusb.h in that output :}

Maybe there's no libusb.h at all (there isn't on my
Slackware machine(s)), and including usb.h will do
the trick?


Cheers,
Tink

knudfl 04-19-2010 05:18 PM

Sorry , my mistake.

#include <usb.h>

.....

stonehinge03 04-20-2010 10:02 AM

dpkg -L <pkgname>

Thank you. Didn't know this one.


All times are GMT -5. The time now is 01:00 PM.