Mah...... sono completamente bloccato.
Ho avviato Mint. Ho copiato le righe indicate nella guida in un documento chiamato apx.c che ho salvato sul desktop. Apro il terminale, scrivo sudo su, mi chiede la password e scrivo cd/home/il nome utente/Scrivania e mi dice directory inesistente. Allora vado sulla cartella Home del desktop, vado sulla cartella Scrivania e col tasto destro la apro sul terminale. Digito gcc apx.c -o apx -lusb-1.0 e fa una sorta di scansione. Chiudo il terminale ma sulla scrivania continua ad esserci solo il documento apx.c
Ecco il risultato:
sasi@HP ~/Scrivania $ gcc apx.c -o apx -lusb-1.0
apx.c:1:9: error: #include expects "FILENAME" or <FILENAME>
#include
^
apx.c:2:9: error: #include expects "FILENAME" or <FILENAME>
#include
^
apx.c:3:9: 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");
^
sasi@HP ~/Scrivania $