Windows 驱动程序 C1083 错误
我创建了简单的“Hello world”Windows 驱动程序。
hello.c
#include <ntddk.h>
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
DbgPrint("Hello, World\n");
return STATUS_SUCCESS;
}
makefile
!INCLUDE $(NTMAKEENV)\makefile.def
源
TARGETNAME = hello
TARGETPATH = obj
TARGETTYPE = DRIVER
INCLUDES = %BUILD%\inc
LIBS = %BUILD%\lib
SOURCES = hello.c
如果我通过检查构建环境构建驱动程序,我会得到:
错误 C1083:无法打开包含文件:'codeanalysis\sourceannotations.h':没有这样的文件或目录
C:\WinDDK\7600.16385.1\inc\crt< 中不包含此类文件或目录
sourceannotations.h
/code> 和 C:\Program Files\Microsoft Visual Studio 10.0\VC\include\CodeAnalysis
,但我只能使用 Winddk 中的包含文件目录。
你有什么建议我应该做什么吗?
I created simple "Hello world" windows driver.
hello.c
#include <ntddk.h>
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
DbgPrint("Hello, World\n");
return STATUS_SUCCESS;
}
makefile
!INCLUDE $(NTMAKEENV)\makefile.def
sources
TARGETNAME = hello
TARGETPATH = obj
TARGETTYPE = DRIVER
INCLUDES = %BUILD%\inc
LIBS = %BUILD%\lib
SOURCES = hello.c
If I build driver by Checked Build Environment, I get:
error C1083: Cannot open include file: 'codeanalysis\sourceannotations.h': No such file or directory
sourceannotations.h
is included in C:\WinDDK\7600.16385.1\inc\crt
and C:\Program Files\Microsoft Visual Studio 10.0\VC\include\CodeAnalysis
, but I can only use included files from Winddk directory.
Do you have any suggestion what should I do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许我错误地安装了DDK,因为重新安装DDK后我编译文件没有问题。
Maybe I incorrectly installed the DDK, because after reinstalling DDK I compiled files without problems.