root@P370SM:/home/denis/Scrivania# gcc apx.c -o apx -lusb-1.0
apx.c:1:10: error: #include expects "FILENAME" or <FILENAME>
#include
^
apx.c:2:10: error: #include expects "FILENAME" or <FILENAME>
#include
^
apx.c:3:10: error: #include expects "FILENAME" or <FILENAME>
#include
^
apx.c: In function ‘main’:
apx.c:10:1: error: unknown type name ‘libusb_context’
libusb_context* ctx = NULL;
^
apx.c:10:23: error: ‘NULL’ undeclared (first use in this function)
libusb_context* ctx = NULL;
^
apx.c:10:23: note: each undeclared identifier is reported only once for each function it appears in
apx.c:11:1: error: unknown type name ‘libusb_device_handle’
libusb_device_handle* dev_handle = NULL;
^
apx.c:14:12: warning: assignment makes pointer from integer without a cast [enabled by default]
dev_handle = libusb_open_device_with_vid_pid(ctx, 0x0955, 0x7820);
^
apx.c:22:1: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
printf("uid: %#016lx\n", *(uint64_t*)data);
^
apx.c:22:28: error: ‘uint64_t’ undeclared (first use in this function)
printf("uid: %#016lx\n", *(uint64_t*)data);
^
apx.c:22:37: error: expected expression before ‘)’ token
printf("uid: %#016lx\n", *(uint64_t*)data);
^
apx.c:27:1: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
printf("Error: We got %d bytes of data insetad of the 8 bytes we expected...\n", received_length);
^
apx.c:32:1: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
printf("Error: USB read failed!\n");
^
apx.c:38:1: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
printf("Error: Failed to open device!\n");
^