Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

[Compile Error] usb.h - awflash.c #7

Open
MarinX opened this issue Oct 26, 2013 · 2 comments
Open

[Compile Error] usb.h - awflash.c #7

MarinX opened this issue Oct 26, 2013 · 2 comments

Comments

@MarinX
Copy link

MarinX commented Oct 26, 2013

cc -Wall -o log2bin log2bin.c
cc -Wall -o awimage awimage.c parsecfg.c twofish.c rc6.c
awimage.c: In function ‘decrypt_image’:
awimage.c:371:43: warning: variable ‘firmware_id’ set but not used [-Wunused-but-set-variable]
awimage.c:371:30: warning: variable ‘hardware_id’ set but not used [-Wunused-but-set-variable]
awimage.c:371:25: warning: variable ‘vid’ set but not used [-Wunused-but-set-variable]
awimage.c:371:20: warning: variable ‘pid’ set but not used [-Wunused-but-set-variable]
twofish.c: In function ‘tf_init’:
twofish.c:405:33: warning: variable ‘mo_key’ set but not used [-Wunused-but-set-variable]
twofish.c:405:22: warning: variable ‘me_key’ set but not used [-Wunused-but-set-variable]
cc -Wall -o awflash awflash.c -lusb
awflash.c:115:10: error: unknown type name ‘libusb_device_handle’
awflash.c:178:13: error: unknown type name ‘libusb_device_handle’
awflash.c:315:20: error: unknown type name ‘libusb_device_handle’
awflash.c: In function ‘main’:
awflash.c:338:2: error: unknown type name ‘libusb_device_handle’
awflash.c:374:11: warning: assignment from incompatible pointer type [enabled by default]
awflash.c:379:2: warning: passing argument 1 of ‘usb_set_configuration’ from incompatible pointer type [enabled by default]
/usr/include/usb.h:309:5: note: expected ‘struct usb_dev_handle ’ but argument is of type ‘int *’
awflash.c:383:2: warning: passing argument 1 of ‘usb_claim_interface’ from incompatible pointer type [enabled by default]
/usr/include/usb.h:310:5: note: expected ‘struct usb_dev_handle *’ but argument is of type ‘int *’
awflash.c:387:2: warning: passing argument 1 of ‘usb_set_altinterface’ from incompatible pointer type [enabled by default]
/usr/include/usb.h:312:5: note: expected ‘struct usb_dev_handle *’ but argument is of type ‘int *’
awflash.c:392:2: warning: implicit declaration of function ‘aw_get_version’ [-Wimplicit-function-declaration]
awflash.c:396:3: warning: implicit declaration of function ‘fex_command’ [-Wimplicit-function-declaration]
awflash.c:413:3: warning: implicit declaration of function ‘fex_write_file’ [-Wimplicit-function-declaration]
awflash.c:423:20: error: ‘AWL_FEL_1_EXEC’ undeclared (first use in this function)
awflash.c:423:20: note: each undeclared identifier is reported only once for each function it appears in
make: *
* [awflash] Error 1

Running Ubuntu 12.04 with
libusb-dev (2:0.1.12-20)
libusb-1.0-0-dev (2:1.0.9~rc3-2ubuntu1)

@xevilstar
Copy link

same problem here

@NoohPeePee
Copy link

Me too have the same problem:
/awutils$ make
cc -Wall -o awflash awflash.c -lusb
awflash.c:115:10: error: unknown type name ‘libusb_device_handle’
awflash.c:178:13: error: unknown type name ‘libusb_device_handle’
awflash.c:315:20: error: unknown type name ‘libusb_device_handle’
awflash.c: In function ‘main’:
awflash.c:338:2: error: unknown type name ‘libusb_device_handle’
awflash.c:374:11: warning: assignment from incompatible pointer type [enabled by default]
awflash.c:379:2: warning: passing argument 1 of ‘usb_set_configuration’ from incompatible pointer type [enabled by default]
In file included from awflash.c:23:0:
/usr/include/usb.h:309:5: note: expected ‘struct usb_dev_handle ’ but argument is of type ‘int *’
awflash.c:383:2: warning: passing argument 1 of ‘usb_claim_interface’ from incompatible pointer type [enabled by default]
In file included from awflash.c:23:0:
/usr/include/usb.h:310:5: note: expected ‘struct usb_dev_handle *’ but argument is of type ‘int *’
awflash.c:387:2: warning: passing argument 1 of ‘usb_set_altinterface’ from incompatible pointer type [enabled by default]
In file included from awflash.c:23:0:
/usr/include/usb.h:312:5: note: expected ‘struct usb_dev_handle *’ but argument is of type ‘int *’
awflash.c:392:2: warning: implicit declaration of function ‘aw_get_version’ [-Wimplicit-function-declaration]
awflash.c:396:3: warning: implicit declaration of function ‘fex_command’ [-Wimplicit-function-declaration]
awflash.c:413:3: warning: implicit declaration of function ‘fex_write_file’ [-Wimplicit-function-declaration]
awflash.c:423:20: error: ‘AWL_FEL_1_EXEC’ undeclared (first use in this function)
awflash.c:423:20: note: each undeclared identifier is reported only once for each function it appears in
make: *
* [awflash] Error 1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants