Discussion:
[BitPim-devel] USB Error on Linux
Wei Hu
2006-09-26 20:26:03 UTC
Permalink
Hi,

When I tried to build the usb module I got the following error:

~/bitpim-svn/bitpim/src/native/usb$ swig -python -I/usr/include libusb.i
/usr/include/usb.h:69: Error: Syntax error in input(3).
/usr/include/usb.h:104: Warning(312): Nested struct not currently
supported (ignored).
/usr/include/usb.h:132: Warning(312): Nested struct not currently
supported (ignored).
/usr/include/usb.h:139: Warning(312): Nested struct not currently
supported (ignored).
/usr/include/usb.h:157: Warning(312): Nested struct not currently
supported (ignored).
/usr/include/usb.h:257: Warning(312): Nested struct not currently
supported (ignored).
/usr/include/usb.h:268: Warning(312): Nested struct not currently
supported (ignored).

I've attached the header file usb.h.
My system is running Debian unstable.
The version of libusb-dev is 0.1.12 and the kernel is 2.6.16.
Aaron M. Ucko
2006-09-27 15:50:23 UTC
Permalink
Post by Wei Hu
/usr/include/usb.h:69: Error: Syntax error in input(3).
Please try patching libusb.i as follows:

--- bitpim-0.9.07.dfsg.1.orig/src/native/usb/libusb.i
+++ bitpim-0.9.07.dfsg.1/src/native/usb/libusb.i
@@ -43,6 +43,8 @@
typedef unsigned short u_int16_t;
typedef unsigned char u_int8_t;

+#define __attribute__(x)
+
%include usb.h

// various wrappers and convenience functions
--
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
Finger ***@monk.mit.edu (NOT a valid e-mail address) for more info.
Loading...