I have installed xp_sp1_ddk on my computer(my os is w2k sp4), and I'm trying
to compile the ddk sample program "bulkusb" using the "W2K checked build
environment". Unfortunately I got 621 errors, and all of them were syntax
errors about "(", ")" and ";", to list some of them:
======================================================
bulkpwr.h(147) : error C2143: syntax error : missing ')' before 'identifier'
bulkpwr.h(147) : error C2061: syntax error : identifier 'DeviceExtension'
bulkpwr.h(147) : error C2059: syntax error : ''
bulkpwr.h(148) : error C2059: syntax error : ')'
bulkdev.h(67) : error C2146: syntax error : missing ')' before identifier
'Devic
eExtension'
========================================================
However, when I built the program using "winxp checked build environment", I
successfully got the right "bulkusb.sys" file.
Since it is the sample program of ddk, it is not likely to have sytax
errors, and I have rightly set the environment variable using
"setenv D:\WINDDK\2600.1106 chk W2K", I have been so frustrated by the errors.

What might be the problems?

Re: weird errors when compiling bulkusb by Mark

Mark
Wed Apr 12 12:05:42 CDT 2006

Odie wrote:
> I have installed xp_sp1_ddk on my computer(my os is w2k sp4), and I'm trying
> to compile the ddk sample program "bulkusb" using the "W2K checked build
> environment". Unfortunately I got 621 errors, and all of them were syntax
> errors about "(", ")" and ";", to list some of them:
> ======================================================
> bulkpwr.h(147) : error C2143: syntax error : missing ')' before 'identifier'
> bulkpwr.h(147) : error C2061: syntax error : identifier 'DeviceExtension'
> bulkpwr.h(147) : error C2059: syntax error : ''
> bulkpwr.h(148) : error C2059: syntax error : ')'
> bulkdev.h(67) : error C2146: syntax error : missing ')' before identifier
> 'Devic
> eExtension'
> ========================================================
> However, when I built the program using "winxp checked build environment", I
> successfully got the right "bulkusb.sys" file.
> Since it is the sample program of ddk, it is not likely to have sytax
> errors, and I have rightly set the environment variable using
> "setenv D:\WINDDK\2600.1106 chk W2K", I have been so frustrated by the errors.
>
> What might be the problems?
>

1) that is a very old ddk. you ought to update to 3790.sp1.
2) not all samples build for all target environments. The more recent
ddks indicate clearly in the html readme file at the top (srcindex.html)
that describes what the samples do and which target platforms they can
be built against.