It's important to read C compiler errors from top to bottom. Don't
even bother reading the lower messages until you understand and
correct the upper ones. Follow the line numbers listed in the errors.
So, it appears to me that you are missing linux/mod_devicetable.h -
line 4 of usb.h includes it. That's the first error.
The messages above that are there you help find why the compiler ran
into an error - USBDAQ.h line 36 inlcudes USBDAQSample.h. Line 36 of
USBDAQSample includes USB.h. Line 4 of usb.h attempts to include
linux/mod_devicetable.h which apparently doesn't exist anywhere that
the compiler knows to look for it.
It's very useful to use an editor that readily displays the line
number that the cursor is on. Vim (vi, gvim) and emacs (xemacs) do
this directly.
Matt-
mod_devicetable.h is in the same directory I chose for usb.h
See the attached jpg.
Paul Lamar
The path to usb.h that the compiler is using is /usr/include/usb.h -
as stated by the error message. I'm pretty sure the compiler is
following the precedence of include paths. It doesn't appear that
there's a "linux" dir in any of your included dirs. You specifically
included which usb.h to use, but that doesn't help to find
linux/mod_devicetable.h ..
Matt-
Yes there is Matt. Look at the fine print on top and bottom
of this jpg I sent.
Then compare that with the parameters in the gcc command line.
I think they match.
Paul Lamar
Where is the linux subdir? If it is the same dir as where usb.h
resides, I don't think that will work. As an experiment, make a
...include/linux/linux/ and copy mod_devicetable.h to it.
Matt-
Look at linux-directory-list.jpg attached
it is in the same directory.
If you look at locate-usb.h.pdf you can see all the occurrences
of usb.h. attached.
Paul Lamar
Exactly.. That's what I'm saying. They're in the same dir, but the
include statement says that they will be in different dirs. I think
Kenny is saying the same thing, but in a different way.
Matt-
Here are all the directory with mod_devicetable.h:
/usr/src/linux-headers-2.6.28-11/include/linux/mod_devicetable.h
/usr/src/linux-headers-2.6.28-11-generic/include/linux/mod_devicetable.h
/usr/src/linux-headers-2.6.28-15/include/linux/mod_devicetable.h
/usr/src/linux-headers-2.6.28-15-generic/include/linux/mod_devicetable.h
/usr/src/linux-headers-2.6.28-16/include/linux/mod_devicetable.h
/usr/src/linux-headers-2.6.28-16-generic/include/linux/mod_devicetable.h
/usr/src/linux-headers-2.6.28-17/include/linux/mod_devicetable.h
/usr/src/linux-headers-2.6.28-17-generic/include/linux/mod_devicetable.h
What do I do now? Which one should I choose?
Perhaps they have changed it every time they have updated the kernal
and these header directories correlate with Linux updates.
Anybody know how to determine the upgrade level?
I get an upgrade automatically about once a week.
It does not make much sense to change these files as
the kernal does not recompile every time you boot it.
Paul Lamar
Did you get the latest linux package? After you unzip it, there is "Makefile" in the
directory. Edit the 2nd line of the make file, change:
LIBUSB = /usr/local
to
LIBUSB = /usr/src/linux-headers-2.6.28-17
Then type the command "make". It will compile the source code automatically.
Mike
OK Mike Thanks. I give that a try.
Paul Lamar
--
The Rotary Engine NewsLetter. Powered by Linux.
ACRE NL web site.
http://www.rotaryeng.net
Youtube key word UTUBPLEASE
Copyright 1998-2009 All world wide rights reserved.