这错误让我很纠结,求解!

风吹草低现羊牛 2011-12-17 08:59:24
#include <wdm.h>
#include <ntdef.h>

VOID UnLoad(PDRIVER_OBJECT DriverObject)
{
KdPrint("xxxx");
}

NTSTATUS
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath
)
{
/* NTSTATUS status;*/
DriverObject->DriverUnload = UnLoad;
return 1;
}


source

TARGETNAME=wdm
TARGETPATH=obj
TARGETTYPE=DRIVER

SOURCES= firstwdm.c



错误

E:\DDK>build
path contains nonexistant c:\program files (x86)\amd app\bin\x86, removing
BUILD: Compile and Link for IA64
BUILD: Loading e:\winddk\7600.16385.1\build.dat...
BUILD: Computing Include file dependencies:
BUILD: Start time: Sat Dec 17 20:59:02 2011
BUILD: Examining e:\ddk directory for files to compile.
BUILD: Saving e:\winddk\7600.16385.1\build.dat...
BUILD: Compiling and Linking e:\ddk directory
Compiling - firstwdm.c
1>errors in directory e:\ddk
1>e:\ddk\firstwdm.c(7) : error C2143: syntax error : missing ';' before 'string'

Linking Executable - objchk_win7_ia64\ia64\wdm.sys
1>link : error LNK1181: cannot open input file 'e:\ddk\objchk_win7_ia64\ia64\fir
stwdm.obj'
BUILD: Finish time: Sat Dec 17 20:59:03 2011
BUILD: Done

3 files compiled - 2 Warnings - 1 Error
1 executable built - 1 Error

E:\DDK>


初学DDK,理论学了很多,一编译就卡起了。纠结中。。。
...全文
63 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
youzi722 2011-12-18
  • 打赏
  • 举报
回复
这句有错
KdPrint("xxxx");
应该为
KdPrint(("xxxx"));
看一下KdPrint的宏定义就知道了。

21,597

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 驱动开发/核心开发
社区管理员
  • 驱动开发/核心开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧