WDK6开发环境设置问题,添加新的头文件会报找不到

Missa 2010-11-30 10:10:44
我参照网上的帖子,用VS2008+DDKWizard配置的WDK开发环境.
在新建项目时,如果使用默认的模板,可以正常生成.我想加入"wdk.h"时,就会报找不到该文件.
VS2008的VC目录中,包含文件已经添加以下
[Quote]D:\WinDDK\7600.16385.1\inc\wdf\kmdf\1.9\
D:\WinDDK\7600.16385.1\inc\api\
D:\WinDDK\7600.16385.1\inc\crt
D:\WinDDK\7600.16385.1\inc\ddk\[/Quote]

库文件目录也已经添加相应的lib文件夹
...全文
313 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
Missa 2010-12-07
  • 打赏
  • 举报
回复
有其他的答案吗?
luawkk 2010-12-03
  • 打赏
  • 举报
回复
Missa 2010-12-03
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 ouyh12345 的回复:]
那很奇怪了,直接用绝对路径呢?
[/Quote]
使用绝对路径可以顺利编译.Why?难道有哪个优先级更高覆盖了?
Missa 2010-12-03
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 visualeleven 的回复:]
VS2008 、DDK XP 和DDKWizard 搭建驱动开发环境
[/Quote]

我是按照这个文件配置的环境,现在依然报找不到wdf.h这个头.所有inc/kmdf/1.9下的头全部找不到.
J_act 2010-12-02
  • 打赏
  • 举报
回复
靠,不是make,是build
J_act 2010-12-02
  • 打赏
  • 举报
回复
在文件目录下自己写个source文件make一下。
hyc29 2010-12-02
  • 打赏
  • 举报
回复
调整一下include的顺序试试
ouyh12345 2010-11-30
  • 打赏
  • 举报
回复
那很奇怪了,直接用绝对路径呢?
Missa 2010-11-30
  • 打赏
  • 举报
回复
也不行.
我把目录添加到项目的附加引用搜索路径里,也不行.依然找不到.
ouyh12345 2010-11-30
  • 打赏
  • 举报
回复
在工程的设置里添加头文件搜索路径呢?
Missa 2010-11-30
  • 打赏
  • 举报
回复
wdf.h 确实在
引用
D:\WinDDK\7600.16385.1\inc\wdf\kmdf\1.9\wdf.h

我在项目中通过选择头文件然后选打开,可以定位到该文件
ouyh12345 2010-11-30
  • 打赏
  • 举报
回复
查找wdf.h,看在哪个文件夹里
Missa 2010-11-30
  • 打赏
  • 举报
回复
输出内容如下
引用
1>------ 已启动生成: 项目: Driver1.W7, 配置: W7 checked Win32 ------
1>正在执行生成文件项目操作
1>OSR DDKBUILD.CMD V7.4/r60 (2009-11-28) - OSR, Open Systems Resources, Inc.
1>DDKBLD: New build number is 2 ...
1>DDKBLD: W7 (checked) using the Windows 7/Windows 2008 Server R2 DDK and %W7BASE%
1>DDKBLD: Directory: d:\work\WORKSP~1\Driver1\Driver1
1>DDKBLD: W7BASE: D:\WinDDK\760016~1.1
1>DDKBLD: Run build -MI -Ze for checked version in .
1>path contains nonexistant d:\program files (x86)\microsoft visual studio 9.0\common7\tools\bin, removing
1>BUILD: Compile and Link for x86
1>BUILD: Start time: Tue Nov 30 13:39:26 2010
1>BUILD: Examining d:\work\worksp~1\driver1\driver1 directory for files to compile.
1> d:\work\worksp~1\driver1\driver1
1>BUILD: Compiling and Linking d:\work\worksp~1\driver1\driver1 directory
1>Compiling - driver1.cpp
1>1>errors in directory d:\work\worksp~1\driver1\driver1
1>1>d:\work\workspace\driver1\driver1\driver1.h(25) : error C1083: Cannot open include file: 'wdf.h': No such file or directory
1>Linking Executable - objchk_win7_x86\i386\driver1.sys
1>1>link : error LNK1181: cannot open input file 'd:\work\worksp~1\driver1\driver1\objchk_win7_x86\i386\driver1.obj'
1>BUILD: Finish time: Tue Nov 30 13:39:27 2010
1>BUILD: Done
1> 3 files compiled - 1 Warning - 1 Error
1> 1 executable built - 1 Error
1>DDKBLD: ================ Build warnings =======================
1>1>d:\work\workspace\driver1\driver1\driver1.h(25) : fatal error C1083: Cannot open include file: 'wdf.h': No such file or directory
1>1>d:\work\workspace\driver1\driver1\driver1.h(25) : error C1083: Cannot open include file: 'wdf.h': No such file or directory
1>1>LINK : fatal error LNK1181: cannot open input file 'd:\work\worksp~1\driver1\driver1\objchk_win7_x86\i386\driver1.obj'
1>1>link : error LNK1181: cannot open input file 'd:\work\worksp~1\driver1\driver1\objchk_win7_x86\i386\driver1.obj'
1>DDKBLD: =======================================================
1>DDKBLD: Build complete
1>DDKBLD: Building browse information files
1>生成日志保存在“file://d:\work\WorkSpace\Driver1\Driver1\BuildLog.htm”
1>Driver1.W7 - 6 个错误,0 个警告
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========

2,640

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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