我刚开始学习驱动开发,今天按照网上说的方法安装了VC6.0的英文版,再安装了winxpddk,drvier studio3.2!
在编译库文件时如下编译:
启动VC,点击DriverStudio菜单下的DDK Build Settings在弹出的对话框中选择已经安装的DDK目录.在Windows DDK compiler Options中选择: "Enable only for Driver Studio".如果是用DS2.6生成的项目则选择:"Enable for all c/c++ projects",用Open Workspace打开位于DS安装目录的 ……\DriverWorks\Source\vdwlibs.dsw,选择VC的Build菜单,选择batch Build,在之后的对话框中选择"Select x86",然后点击Rebuld all.等待编译成功。
但是出现错误D:\Program Files\Compuware\DriverStudio\DriverWorks\include\dep_wdm\hidport.h(6) : fatal error C1189: #error : The file is from the DDK at src\wdm\hid\inc. Install DDK HID samples to install hidport.h. Or update INCLUDE path for hidport.h in the DDK!
Error executing cl.exe. vdw_wdm.lib - 1 error(s), 0 warning(s)
请高手指教啊!
Install DDK HID samples to install hidport.h Or update INCLUDE path for hidport.h in the DDK
就是缺少头文件,你可以再次运行DDK安装程序,把所有的例子程序都安装上就行了。或者在你安装DDK的目录
下搜索一下是否有这个头文件,如果有,就不用再去安装了,只需要将INCLUDE路径更新一下就行了。