Hi Gerold,
danke mal wieder für die schnelle Antwort. Ich hatte die Dateien auch erst in einem eigenen Ordner aber da kommt dann folgende Fehlermeldung:
[code=]C:\Dokumente und Einstellungen\Henry\Desktop\pyusb-0.4.1\pyusb0.4.1>python setup.py build
Der Befehl "python" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
[/code]
daher die Kopie der Dateien in den Ordner selbst.
Hab deine Befehlskette (C:\Programme\Python25>python setup.py build -c mingw32 install) mal in diesem Ordner ausgeführt und dann DAS:
[code=]pyusb.c:266: error: `USB_ENDPOINT_TYPE_BULK' undeclared (first use in this funct
ion)
pyusb.c:267: error: `USB_ENDPOINT_TYPE_INTERRUPT' undeclared (first use in this
function)
pyusb.c:268: error: `USB_MAXINTERFACES' undeclared (first use in this function)
pyusb.c:269: error: `USB_MAXALTSETTING' undeclared (first use in this function)
pyusb.c:270: error: `USB_MAXCONFIG' undeclared (first use in this function)
pyusb.c:271: error: `USB_REQ_GET_STATUS' undeclared (first use in this function)
pyusb.c:272: error: `USB_REQ_CLEAR_FEATURE' undeclared (first use in this functi
on)
pyusb.c:273: error: `USB_REQ_SET_FEATURE' undeclared (first use in this function
)
pyusb.c:274: error: `USB_REQ_SET_ADDRESS' undeclared (first use in this function
)
pyusb.c:275: error: `USB_REQ_GET_DESCRIPTOR' undeclared (first use in this funct
ion)
pyusb.c:276: error: `USB_REQ_SET_DESCRIPTOR' undeclared (first use in this funct
ion)
pyusb.c:277: error: `USB_REQ_GET_CONFIGURATION' undeclared (first use in this fu
nction)
pyusb.c:278: error: `USB_REQ_SET_CONFIGURATION' undeclared (first use in this fu
nction)
pyusb.c:279: error: `USB_REQ_GET_INTERFACE' undeclared (first use in this functi
on)
pyusb.c:280: error: `USB_REQ_SET_INTERFACE' undeclared (first use in this functi
on)
pyusb.c:281: error: `USB_REQ_SYNCH_FRAME' undeclared (first use in this function
)
pyusb.c:282: error: `USB_TYPE_STANDARD' undeclared (first use in this function)
pyusb.c:283: error: `USB_TYPE_CLASS' undeclared (first use in this function)
pyusb.c:284: error: `USB_TYPE_VENDOR' undeclared (first use in this function)
pyusb.c:285: error: `USB_TYPE_RESERVED' undeclared (first use in this function)
pyusb.c:286: error: `USB_RECIP_DEVICE' undeclared (first use in this function)
pyusb.c:287: error: `USB_RECIP_INTERFACE' undeclared (first use in this function
)
pyusb.c:288: error: `USB_RECIP_ENDPOINT' undeclared (first use in this function)
pyusb.c:289: error: `USB_RECIP_OTHER' undeclared (first use in this function)
pyusb.c:290: error: `USB_ENDPOINT_IN' undeclared (first use in this function)
pyusb.c:291: error: `USB_ENDPOINT_OUT' undeclared (first use in this function)
pyusb.c:292: error: `USB_ERROR_BEGIN' undeclared (first use in this function)
pyusb.c: At top level:
pyusb.c:381: error: initializer element is not constant
pyusb.c:381: error: (near initialization for `Py_usb_Endpoint_Type.tp_new')
pyusb.c:395: warning: "struct usb_endpoint_descriptor" declared inside parameter
list
pyusb.c:396: error: conflicting types for 'set_Endpoint_fields'
pyusb.h:131: error: previous declaration of 'set_Endpoint_fields' was here
pyusb.c:396: error: conflicting types for 'set_Endpoint_fields'
pyusb.h:131: error: previous declaration of 'set_Endpoint_fields' was here
pyusb.c: In function `set_Endpoint_fields':
pyusb.c:397: error: dereferencing pointer to incomplete type
pyusb.c:398: error: dereferencing pointer to incomplete type
pyusb.c:399: error: dereferencing pointer to incomplete type
pyusb.c:400: error: dereferencing pointer to incomplete type
pyusb.c:401: error: dereferencing pointer to incomplete type
pyusb.c: At top level:
pyusb.c:407: warning: "struct usb_endpoint_descriptor" declared inside parameter
list
pyusb.c:408: error: conflicting types for 'new_Endpoint'
pyusb.h:135: error: previous declaration of 'new_Endpoint' was here
pyusb.c:408: error: conflicting types for 'new_Endpoint'
pyusb.h:135: error: previous declaration of 'new_Endpoint' was here
pyusb.c:514: error: initializer element is not constant
pyusb.c:514: error: (near initialization for `Py_usb_Interface_Type.tp_new')
pyusb.c:528: warning: "struct usb_interface_descriptor" declared inside paramete
r list
pyusb.c:529: error: conflicting types for 'set_Interface_fields'
pyusb.h:140: error: previous declaration of 'set_Interface_fields' was here
pyusb.c:529: error: conflicting types for 'set_Interface_fields'
pyusb.h:140: error: previous declaration of 'set_Interface_fields' was here
pyusb.c: In function `set_Interface_fields':
pyusb.c:532: error: dereferencing pointer to incomplete type
pyusb.c:533: error: dereferencing pointer to incomplete type
pyusb.c:534: error: dereferencing pointer to incomplete type
pyusb.c:535: error: dereferencing pointer to incomplete type
pyusb.c:536: error: dereferencing pointer to incomplete type
pyusb.c:537: error: dereferencing pointer to incomplete type
pyusb.c:539: error: dereferencing pointer to incomplete type
pyusb.c:545: error: dereferencing pointer to incomplete type
pyusb.c:546: error: dereferencing pointer to incomplete type
pyusb.c: At top level:
pyusb.c:552: warning: "struct usb_interface_descriptor" declared inside paramete
r list
pyusb.c:553: error: conflicting types for 'new_Interface'
pyusb.h:144: error: previous declaration of 'new_Interface' was here
pyusb.c:553: error: conflicting types for 'new_Interface'
pyusb.h:144: error: previous declaration of 'new_Interface' was here
pyusb.c:673: error: initializer element is not constant
pyusb.c:673: error: (near initialization for `Py_usb_Configuration_Type.tp_new')
pyusb.c:687: warning: "struct usb_config_descriptor" declared inside parameter l
ist
pyusb.c:688: error: conflicting types for 'set_Configuration_fields'
pyusb.h:149: error: previous declaration of 'set_Configuration_fields' was here
pyusb.c:688: error: conflicting types for 'set_Configuration_fields'
pyusb.h:149: error: previous declaration of 'set_Configuration_fields' was here
pyusb.c: In function `set_Configuration_fields':
pyusb.c:692: error: dereferencing pointer to incomplete type
pyusb.c:693: error: dereferencing pointer to incomplete type
pyusb.c:694: error: dereferencing pointer to incomplete type
pyusb.c:695: error: dereferencing pointer to incomplete type
pyusb.c:696: error: dereferencing pointer to incomplete type
pyusb.c:697: error: dereferencing pointer to incomplete type
pyusb.c:699: error: dereferencing pointer to incomplete type
pyusb.c:703: error: dereferencing pointer to incomplete type
pyusb.c:704: error: dereferencing pointer to incomplete type
pyusb.c:710: error: dereferencing pointer to incomplete type
pyusb.c: At top level:
pyusb.c:719: warning: "struct usb_config_descriptor" declared inside parameter l
ist
pyusb.c:720: error: conflicting types for 'new_Configuration'
pyusb.h:153: error: previous declaration of 'new_Configuration' was here
pyusb.c:720: error: conflicting types for 'new_Configuration'
pyusb.h:153: error: previous declaration of 'new_Configuration' was here
pyusb.c:892: error: initializer element is not constant
pyusb.c:892: error: (near initialization for `Py_usb_Device_Type.tp_new')
pyusb.c: In function `set_Device_fields':
pyusb.c:908: error: dereferencing pointer to incomplete type
pyusb.c:911: error: dereferencing pointer to incomplete type
pyusb.c:912: error: dereferencing pointer to incomplete type
pyusb.c:914: error: dereferencing pointer to incomplete type
pyusb.c:915: error: dereferencing pointer to incomplete type
pyusb.c:918: error: dereferencing pointer to incomplete type
pyusb.c:919: error: dereferencing pointer to incomplete type
pyusb.c:921: error: dereferencing pointer to incomplete type
pyusb.c:922: error: dereferencing pointer to incomplete type
pyusb.c:925: error: dereferencing pointer to incomplete type
pyusb.c:926: error: dereferencing pointer to incomplete type
pyusb.c:927: error: dereferencing pointer to incomplete type
pyusb.c:928: error: dereferencing pointer to incomplete type
pyusb.c:929: error: dereferencing pointer to incomplete type
pyusb.c:930: error: dereferencing pointer to incomplete type
pyusb.c:931: error: dereferencing pointer to incomplete type
pyusb.c:932: error: dereferencing pointer to incomplete type
pyusb.c:933: error: dereferencing pointer to incomplete type
pyusb.c:934: error: dereferencing pointer to incomplete type
pyusb.c:937: error: dereferencing pointer to incomplete type
pyusb.c:942: error: dereferencing pointer to incomplete type
pyusb.c:946: error: dereferencing pointer to incomplete type
pyusb.c:947: error: dereferencing pointer to incomplete type
pyusb.c: At top level:
pyusb.c:1043: error: initializer element is not constant
pyusb.c:1043: error: (near initialization for `Py_usb_Bus_Type.tp_new')
pyusb.c:1056: warning: "struct usb_bus" declared inside parameter list
pyusb.c:1057: error: conflicting types for 'new_Bus'
pyusb.h:171: error: previous declaration of 'new_Bus' was here
pyusb.c:1057: error: conflicting types for 'new_Bus'
pyusb.h:171: error: previous declaration of 'new_Bus' was here
pyusb.c: In function `new_Bus':
pyusb.c:1065: error: dereferencing pointer to incomplete type
pyusb.c:1066: error: dereferencing pointer to incomplete type
pyusb.c:1067: error: dereferencing pointer to incomplete type
pyusb.c:1067: warning: left-hand operand of comma expression has no effect
pyusb.c:1067: error: dereferencing pointer to incomplete type
pyusb.c:1075: error: dereferencing pointer to incomplete type
pyusb.c:1075: warning: left-hand operand of comma expression has no effect
pyusb.c:1075: error: dereferencing pointer to incomplete type
pyusb.c:1075: warning: left-hand operand of comma expression has no effect
pyusb.c:1067: warning: value computed is not used
pyusb.c:1075: warning: value computed is not used
pyusb.c:1075: warning: value computed is not used
pyusb.c: In function `Py_usb_DeviceHandle_controlMsg':
pyusb.c:1100: error: `_self' undeclared (first use in this function)
pyusb.c:1100: error: syntax error before ')' token
pyusb.c:1174: warning: implicit declaration of function `usb_control_msg'
pyusb.c:1186: warning: implicit declaration of function `usb_strerror'
pyusb.c:1186: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c: In function `Py_usb_DeviceHandle_setConfiguration':
pyusb.c:1206: error: `_self' undeclared (first use in this function)
pyusb.c:1206: error: syntax error before ')' token
pyusb.c:1228: warning: implicit declaration of function `usb_set_configuration'
pyusb.c:1232: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c: In function `Py_usb_DeviceHandle_claimInterface':
pyusb.c:1245: error: `_self' undeclared (first use in this function)
pyusb.c:1245: error: syntax error before ')' token
pyusb.c:1265: warning: implicit declaration of function `usb_claim_interface'
pyusb.c:1266: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c: In function `Py_usb_DeviceHandle_detachKernelDriver':
pyusb.c:1282: error: `_self' undeclared (first use in this function)
pyusb.c:1282: error: syntax error before ')' token
pyusb.c:1281: warning: unused variable `ret'
pyusb.c: In function `Py_usb_DeviceHandle_releaseInterface':
pyusb.c:1321: error: `_self' undeclared (first use in this function)
pyusb.c:1321: error: syntax error before ')' token
pyusb.c:1326: warning: implicit declaration of function `usb_release_interface'
pyusb.c:1330: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c: In function `Py_usb_DeviceHandle_setAltInterface':
pyusb.c:1349: error: `_self' undeclared (first use in this function)
pyusb.c:1349: error: syntax error before ')' token
pyusb.c:1370: warning: implicit declaration of function `usb_set_altinterface'
pyusb.c:1374: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c: In function `Py_usb_DeviceHandle_bulkWrite':
pyusb.c:1393: error: `_self' undeclared (first use in this function)
pyusb.c:1393: error: syntax error before ')' token
pyusb.c:1421: warning: implicit declaration of function `usb_bulk_write'
pyusb.c:1427: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c: In function `Py_usb_DeviceHandle_bulkRead':
pyusb.c:1446: error: `_self' undeclared (first use in this function)
pyusb.c:1446: error: syntax error before ')' token
pyusb.c:1473: warning: implicit declaration of function `usb_bulk_read'
pyusb.c:1478: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c: In function `Py_usb_DeviceHandle_interruptWrite':
pyusb.c:1500: error: `_self' undeclared (first use in this function)
pyusb.c:1500: error: syntax error before ')' token
pyusb.c:1528: warning: implicit declaration of function `usb_interrupt_write'
pyusb.c:1534: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c: In function `Py_usb_DeviceHandle_interruptRead':
pyusb.c:1553: error: `_self' undeclared (first use in this function)
pyusb.c:1553: error: syntax error before ')' token
pyusb.c:1580: warning: implicit declaration of function `usb_interrupt_read'
pyusb.c:1585: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c: In function `Py_usb_DeviceHandle_resetEndpoint':
pyusb.c:1601: error: `_self' undeclared (first use in this function)
pyusb.c:1601: error: syntax error before ')' token
pyusb.c:1615: warning: implicit declaration of function `usb_resetep'
pyusb.c:1619: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c: In function `Py_usb_DeviceHandle_reset':
pyusb.c:1634: warning: implicit declaration of function `usb_reset'
pyusb.c:1634: error: syntax error before ')' token
pyusb.c:1638: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c: In function `Py_usb_DeviceHandle_clearHalt':
pyusb.c:1651: error: `_self' undeclared (first use in this function)
pyusb.c:1651: error: syntax error before ')' token
pyusb.c:1666: warning: implicit declaration of function `usb_clear_halt'
pyusb.c:1670: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c: In function `Py_usb_DeviceHandle_getString':
pyusb.c:1690: error: `_self' undeclared (first use in this function)
pyusb.c:1690: error: syntax error before ')' token
pyusb.c:1720: warning: implicit declaration of function `usb_get_string_simple'
pyusb.c:1722: warning: implicit declaration of function `usb_get_string'
pyusb.c:1729: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c: In function `Py_usb_DeviceHandle_getDescriptor':
pyusb.c:1751: error: `_self' undeclared (first use in this function)
pyusb.c:1751: error: syntax error before ')' token
pyusb.c:1783: warning: implicit declaration of function `usb_get_descriptor'
pyusb.c:1785: warning: implicit declaration of function `usb_get_descriptor_by_e
ndpoint'
pyusb.c:1792: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c: In function `Py_usb_DeviceHandle_del':
pyusb.c:1959: error: `_self' undeclared (first use in this function)
pyusb.c:1959: error: syntax error before ')' token
pyusb.c:1968: warning: implicit declaration of function `usb_close'
pyusb.c: At top level:
pyusb.c:2013: error: initializer element is not constant
pyusb.c:2013: error: (near initialization for `Py_usb_DeviceHandle_Type.tp_new')
pyusb.c:2024: error: syntax error before '*' token
pyusb.c:2027: warning: return type defaults to `int'
pyusb.c: In function `new_DeviceHandle':
pyusb.c:2028: error: `dh' undeclared (first use in this function)
pyusb.c:2031: error: syntax error before ')' token
pyusb.c:2034: warning: implicit declaration of function `usb_open'
pyusb.c:2034: warning: assignment makes pointer from integer without a cast
pyusb.c:2037: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c: In function `busses':
pyusb.c:2062: warning: implicit declaration of function `usb_find_busses'
pyusb.c:2063: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c:2067: warning: implicit declaration of function `usb_find_devices'
pyusb.c:2068: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c:2072: warning: implicit declaration of function `usb_get_busses'
pyusb.c:2072: warning: assignment makes pointer from integer without a cast
pyusb.c:2075: warning: passing arg 2 of `PyErr_SetString' makes pointer from int
eger without a cast
pyusb.c:2079: error: dereferencing pointer to incomplete type
pyusb.c:2083: error: dereferencing pointer to incomplete type
pyusb.c:2083: warning: value computed is not used
pyusb.c: In function `initusb':
pyusb.c:2144: warning: implicit declaration of function `usb_init'
pyusb.c: At top level:
pyusb.h:131: warning: 'set_Endpoint_fields' declared `static' but never defined
pyusb.h:135: warning: 'new_Endpoint' declared `static' but never defined
pyusb.h:140: warning: 'set_Interface_fields' declared `static' but never defined
pyusb.h:144: warning: 'new_Interface' declared `static' but never defined
pyusb.h:149: warning: 'set_Configuration_fields' declared `static' but never def
ined
pyusb.h:153: warning: 'new_Configuration' declared `static' but never defined
pyusb.h:171: warning: 'new_Bus' declared `static' but never defined
error: command 'gcc' failed with exit status 1
C:\Programme\Python25>[/code]
und was soll ich sagen. Das war noch mehr. Die Konsole konnte nur nicht mehr anzeigen. Ufff
Na das war wohl nicht sehr erfolgreich. Wenn ich das in einen extra Ordner packen soll wieso kennt er dann python nicht? ich denke da liegt bestimmt das Problem. Die Anweiung an sich scheint ja zu funktionieren.
mfg Harry