Pythomias
Gast
Hallo Macindianer
Ich möchte meine USB-Interfacekarte IO-Warrior40 mit Python ansprechen, da mir C++ und Java zu kompliziert sind bzw. eine schreckliche Syntax haben. Damit ich aber mit Python programmieren kann benötigt das PyUSB-Modul leider noch LibUSB. Leider weiß ich nicht wie ich LibUSB zum laufen bekomme, obwohl ich es nach folgendem Schema installiert habe:
% ./configure
% make
Dann rauschen im Terminal sehr viele Meldungen durch und es erscheint wieder der prompt %
Nun compiliere ich am Terminal ein Beispielprogramm das LibUSB beilag :
% g++ testlibusb.c
testlibusb.c:9:17: usb.h: No such file or directory
testlibusb.c: In function `void print_endpoint(usb_endpoint_descriptor*)':
testlibusb.c:15: invalid use of undefined type `struct usb_endpoint_descriptor'
testlibusb.c:13: forward declaration of `struct usb_endpoint_descriptor'
testlibusb.c:16: invalid use of undefined type `struct usb_endpoint_descriptor'
testlibusb.c:13: forward declaration of `struct usb_endpoint_descriptor'
testlibusb.c:17: invalid use of undefined type `struct usb_endpoint_descriptor'
testlibusb.c:13: forward declaration of `struct usb_endpoint_descriptor'
testlibusb.c:18: invalid use of undefined type `struct usb_endpoint_descriptor'
testlibusb.c:13: forward declaration of `struct usb_endpoint_descriptor'
testlibusb.c:19: invalid use of undefined type `struct usb_endpoint_descriptor'
testlibusb.c:13: forward declaration of `struct usb_endpoint_descriptor'
testlibusb.c:20: invalid use of undefined type `struct usb_endpoint_descriptor'
testlibusb.c:13: forward declaration of `struct usb_endpoint_descriptor'
testlibusb.c: In function `void print_altsetting(usb_interface_descriptor*)':
testlibusb.c:27: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c:28: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c:29: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c:30: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c:31: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c:32: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c:33: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c:35: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c:36: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c: In function `void print_interface(usb_interface*)':
testlibusb.c:43: invalid use of undefined type `struct usb_interface'
testlibusb.c:39: forward declaration of `struct usb_interface'
testlibusb.c:44: invalid use of undefined type `struct usb_interface'
testlibusb.c:39: forward declaration of `struct usb_interface'
testlibusb.c: In function `void print_configuration(usb_config_descriptor*)':
testlibusb.c:51: invalid use of undefined type `struct usb_config_descriptor'
testlibusb.c:47: forward declaration of `struct usb_config_descriptor'
testlibusb.c:52: invalid use of undefined type `struct usb_config_descriptor'
testlibusb.c:47: forward declaration of `struct usb_config_descriptor'
testlibusb.c:53: invalid use of undefined type `struct usb_config_descriptor'
testlibusb.c:47: forward declaration of `struct usb_config_descriptor'
testlibusb.c:54: invalid use of undefined type `struct usb_config_descriptor'
testlibusb.c:47: forward declaration of `struct usb_config_descriptor'
testlibusb.c:55: invalid use of undefined type `struct usb_config_descriptor'
testlibusb.c:47: forward declaration of `struct usb_config_descriptor'
testlibusb.c:56: invalid use of undefined type `struct usb_config_descriptor'
testlibusb.c:47: forward declaration of `struct usb_config_descriptor'
testlibusb.c:58: invalid use of undefined type `struct usb_config_descriptor'
testlibusb.c:47: forward declaration of `struct usb_config_descriptor'
testlibusb.c:59: invalid use of undefined type `struct usb_config_descriptor'
testlibusb.c:47: forward declaration of `struct usb_config_descriptor'
testlibusb.c: In function `int print_device(usb_device*, int)':
testlibusb.c:64: `usb_dev_handle' undeclared (first use this function)
testlibusb.c:64: (Each undeclared identifier is reported only once for each
function it appears in.)
testlibusb.c:64: `udev' undeclared (first use this function)
testlibusb.c:69: `usb_open' undeclared (first use this function)
testlibusb.c:71: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:72: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:72: `usb_get_string_simple' undeclared (first use this function)
testlibusb.c:77: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:80: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:82: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:83: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:89: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:92: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:96: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:96: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:98: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:102: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:103: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:111: `usb_close' undeclared (first use this function)
testlibusb.c:114: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:119: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:120: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:122: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:123: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c: In function `int main(int, char**)':
testlibusb.c:136: `usb_init' undeclared (first use this function)
testlibusb.c:138: `usb_find_busses' undeclared (first use this function)
testlibusb.c:139: `usb_find_devices' undeclared (first use this function)
testlibusb.c:141: `usb_busses' undeclared (first use this function)
testlibusb.c:141: invalid use of undefined type `struct usb_bus'
testlibusb.c:131: forward declaration of `struct usb_bus'
testlibusb.c:142: invalid use of undefined type `struct usb_bus'
testlibusb.c:131: forward declaration of `struct usb_bus'
testlibusb.c:143: invalid use of undefined type `struct usb_bus'
testlibusb.c:131: forward declaration of `struct usb_bus'
testlibusb.c:147: invalid use of undefined type `struct usb_bus'
testlibusb.c:131: forward declaration of `struct usb_bus'
testlibusb.c:147: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
was mache ich falsch ?
:-c
Ich möchte meine USB-Interfacekarte IO-Warrior40 mit Python ansprechen, da mir C++ und Java zu kompliziert sind bzw. eine schreckliche Syntax haben. Damit ich aber mit Python programmieren kann benötigt das PyUSB-Modul leider noch LibUSB. Leider weiß ich nicht wie ich LibUSB zum laufen bekomme, obwohl ich es nach folgendem Schema installiert habe:
% ./configure
% make
Dann rauschen im Terminal sehr viele Meldungen durch und es erscheint wieder der prompt %
Nun compiliere ich am Terminal ein Beispielprogramm das LibUSB beilag :
% g++ testlibusb.c
testlibusb.c:9:17: usb.h: No such file or directory
testlibusb.c: In function `void print_endpoint(usb_endpoint_descriptor*)':
testlibusb.c:15: invalid use of undefined type `struct usb_endpoint_descriptor'
testlibusb.c:13: forward declaration of `struct usb_endpoint_descriptor'
testlibusb.c:16: invalid use of undefined type `struct usb_endpoint_descriptor'
testlibusb.c:13: forward declaration of `struct usb_endpoint_descriptor'
testlibusb.c:17: invalid use of undefined type `struct usb_endpoint_descriptor'
testlibusb.c:13: forward declaration of `struct usb_endpoint_descriptor'
testlibusb.c:18: invalid use of undefined type `struct usb_endpoint_descriptor'
testlibusb.c:13: forward declaration of `struct usb_endpoint_descriptor'
testlibusb.c:19: invalid use of undefined type `struct usb_endpoint_descriptor'
testlibusb.c:13: forward declaration of `struct usb_endpoint_descriptor'
testlibusb.c:20: invalid use of undefined type `struct usb_endpoint_descriptor'
testlibusb.c:13: forward declaration of `struct usb_endpoint_descriptor'
testlibusb.c: In function `void print_altsetting(usb_interface_descriptor*)':
testlibusb.c:27: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c:28: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c:29: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c:30: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c:31: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c:32: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c:33: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c:35: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c:36: invalid use of undefined type `struct usb_interface_descriptor
'
testlibusb.c:23: forward declaration of `struct usb_interface_descriptor'
testlibusb.c: In function `void print_interface(usb_interface*)':
testlibusb.c:43: invalid use of undefined type `struct usb_interface'
testlibusb.c:39: forward declaration of `struct usb_interface'
testlibusb.c:44: invalid use of undefined type `struct usb_interface'
testlibusb.c:39: forward declaration of `struct usb_interface'
testlibusb.c: In function `void print_configuration(usb_config_descriptor*)':
testlibusb.c:51: invalid use of undefined type `struct usb_config_descriptor'
testlibusb.c:47: forward declaration of `struct usb_config_descriptor'
testlibusb.c:52: invalid use of undefined type `struct usb_config_descriptor'
testlibusb.c:47: forward declaration of `struct usb_config_descriptor'
testlibusb.c:53: invalid use of undefined type `struct usb_config_descriptor'
testlibusb.c:47: forward declaration of `struct usb_config_descriptor'
testlibusb.c:54: invalid use of undefined type `struct usb_config_descriptor'
testlibusb.c:47: forward declaration of `struct usb_config_descriptor'
testlibusb.c:55: invalid use of undefined type `struct usb_config_descriptor'
testlibusb.c:47: forward declaration of `struct usb_config_descriptor'
testlibusb.c:56: invalid use of undefined type `struct usb_config_descriptor'
testlibusb.c:47: forward declaration of `struct usb_config_descriptor'
testlibusb.c:58: invalid use of undefined type `struct usb_config_descriptor'
testlibusb.c:47: forward declaration of `struct usb_config_descriptor'
testlibusb.c:59: invalid use of undefined type `struct usb_config_descriptor'
testlibusb.c:47: forward declaration of `struct usb_config_descriptor'
testlibusb.c: In function `int print_device(usb_device*, int)':
testlibusb.c:64: `usb_dev_handle' undeclared (first use this function)
testlibusb.c:64: (Each undeclared identifier is reported only once for each
function it appears in.)
testlibusb.c:64: `udev' undeclared (first use this function)
testlibusb.c:69: `usb_open' undeclared (first use this function)
testlibusb.c:71: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:72: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:72: `usb_get_string_simple' undeclared (first use this function)
testlibusb.c:77: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:80: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:82: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:83: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:89: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:92: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:96: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:96: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:98: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:102: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:103: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:111: `usb_close' undeclared (first use this function)
testlibusb.c:114: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:119: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:120: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:122: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c:123: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
testlibusb.c: In function `int main(int, char**)':
testlibusb.c:136: `usb_init' undeclared (first use this function)
testlibusb.c:138: `usb_find_busses' undeclared (first use this function)
testlibusb.c:139: `usb_find_devices' undeclared (first use this function)
testlibusb.c:141: `usb_busses' undeclared (first use this function)
testlibusb.c:141: invalid use of undefined type `struct usb_bus'
testlibusb.c:131: forward declaration of `struct usb_bus'
testlibusb.c:142: invalid use of undefined type `struct usb_bus'
testlibusb.c:131: forward declaration of `struct usb_bus'
testlibusb.c:143: invalid use of undefined type `struct usb_bus'
testlibusb.c:131: forward declaration of `struct usb_bus'
testlibusb.c:147: invalid use of undefined type `struct usb_bus'
testlibusb.c:131: forward declaration of `struct usb_bus'
testlibusb.c:147: invalid use of undefined type `struct usb_device'
testlibusb.c:62: forward declaration of `struct usb_device'
was mache ich falsch ?
:-c