no luck with building dfu-util for windows

Tormod Volden lists.tormod at gmail.com
Sun Apr 8 22:15:48 CEST 2012


2012/4/7 Daniel Li:
> Hi all,
>
> I downloaded libusb-win32-bin-1.2.6.0.zip, and extract the only head file "lusb0_usb.h" and msvc library libusb.lib.
>
> As dfu-util uses libusb.h, I guess it's the only head file "lusb0_usb.h"
>
> But vc6 can't compile dfu-util sucessfully, see below log:
>
> Any idea about this log???

libusb-win32-bin-1.2.6.0.zip follows the libusb 0.1 API, while
dfu-util (now) uses libusb 1.0. So the compiler does not recognize
"libusb_device" which is part of libusb 1.0.

The snapshots I had in mind are those linked under "Latest Binary
Snapshots" on the previously mentioned wiki page, libusb_2012.01.08.7z
(pbr348) and so on.

Tormod



>
> --------------------Configuration: dfu_util - Win32 Debug--------------------
> Compiling...
> dfu.c
> z:\openmoko\dfu-util\src\dfu.h(120) : error C2061: syntax error : identifier 'libusb_device'
> z:\openmoko\dfu-util\src\dfu.h(121) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(122) : error C2059: syntax error : '}'
> z:\openmoko\dfu-util\src\dfu.h(126) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(126) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(127) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(128) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(129) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(129) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(130) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(132) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(133) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(133) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(134) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(136) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(137) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(137) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(138) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(139) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(140) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(140) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(141) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(141) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(142) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(142) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(143) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(143) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(144) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(144) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(145) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(145) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.c(73) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.c(73) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.c(74) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.c(75) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.c(102) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.c(102) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.c(103) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.c(105) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.c(158) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.c(158) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.c(159) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.c(161) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.c(204) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.c(204) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.c(205) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.c(206) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.c(251) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.c(251) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.c(252) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.c(252) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.c(279) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.c(279) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.c(280) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.c(280) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.c(315) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.c(315) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.c(316) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.c(316) : error C2059: syntax error : ')'
> dfu_load.c
> z:\openmoko\dfu-util\src\dfu.h(120) : error C2061: syntax error : identifier 'libusb_device'
> z:\openmoko\dfu-util\src\dfu.h(121) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(122) : error C2059: syntax error : '}'
> z:\openmoko\dfu-util\src\dfu.h(126) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(126) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(127) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(128) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(129) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(129) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(130) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(132) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(133) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(133) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(134) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(136) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(137) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(137) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(138) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(139) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(140) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(140) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(141) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(141) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(142) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(142) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(143) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(143) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu.h(144) : error C2143: syntax error : missing ')' before '*'
> z:\openmoko\dfu-util\src\dfu.h(144) : error C2143: syntax error : missing '{' before '*'
> z:\openmoko\dfu-util\src\dfu.h(145) : error C2059: syntax error : 'type'
> z:\openmoko\dfu-util\src\dfu.h(145) : error C2059: syntax error : ')'
> z:\openmoko\dfu-util\src\dfu_load.c(60) : warning C4013: 'dfu_upload' undefined; assuming extern returning int
> z:\openmoko\dfu-util\src\dfu_load.c(60) : error C2037: left of 'dev_handle' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(60) : error C2037: left of 'interface' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(141) : warning C4013: 'dfu_download' undefined; assuming extern returning int
> z:\openmoko\dfu-util\src\dfu_load.c(141) : error C2037: left of 'dev_handle' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(141) : error C2037: left of 'interface' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(149) : warning C4013: 'dfu_get_status' undefined; assuming extern returning int
> z:\openmoko\dfu-util\src\dfu_load.c(149) : error C2037: left of 'dev_handle' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(149) : error C2037: left of 'interface' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(191) : error C2037: left of 'dev_handle' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(191) : error C2037: left of 'interface' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(204) : error C2037: left of 'dev_handle' specifies undefined struct/union 'dfu_if'
> z:\openmoko\dfu-util\src\dfu_load.c(204) : error C2037: left of 'interface' specifies undefined struct/union 'dfu_if'
> dfuse.c
> z:\openmoko\dfu-util\src\dfuse.c(32) : fatal error C1083: Cannot open include file: 'config.h': No such file or directory
> main.c
> z:\openmoko\dfu-util\src\main.c(30) : fatal error C1083: Cannot open include file: 'config.h': No such file or directory
> Error executing cl.exe.
>
> dfu_util.exe - 102 error(s), 3 warning(s)



More information about the devel mailing list