﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-曾是土木人-随笔分类-驱动开发</title><link>http://www.cppblog.com/hongfei/category/20564.html</link><description /><language>zh-cn</language><lastBuildDate>Mon, 17 Jun 2013 09:40:37 GMT</lastBuildDate><pubDate>Mon, 17 Jun 2013 09:40:37 GMT</pubDate><ttl>60</ttl><item><title>VS2008的DDK环境配置</title><link>http://www.cppblog.com/hongfei/archive/2013/06/17/201089.html</link><dc:creator>曾是土木人</dc:creator><author>曾是土木人</author><pubDate>Mon, 17 Jun 2013 09:12:00 GMT</pubDate><guid>http://www.cppblog.com/hongfei/archive/2013/06/17/201089.html</guid><wfw:comment>http://www.cppblog.com/hongfei/comments/201089.html</wfw:comment><comments>http://www.cppblog.com/hongfei/archive/2013/06/17/201089.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/hongfei/comments/commentRss/201089.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/hongfei/services/trackbacks/201089.html</trackback:ping><description><![CDATA[<p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 19px; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #fefef2;">之前装了DDK准备学习内核的，装完后一直没有测试，今天写了个文件读写准备测试，发现编译不通，报出了&#8220;无法打开包括文件：&#8220;ntddk.h&#8221;&#8221;。问了大牛以后得知是没有设置环境造成的。随即调查了环境的配置方法。顺便给出相关东西的下载地址。</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 19px; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #fefef2;">&nbsp;&nbsp;&nbsp; 首先安装DDK(当你没装)<span style="margin: 0px; padding: 0px; line-height: 1.5; color: #888888;"><a target="_blank" href="http://210.21.117.86/down/ocx/winxpddk.zip" title="http://210.21.117.86/down/ocx/winxpddk.zip " style="margin: 0px; padding: 0px; color: #075db3;"><span style="margin: 0px; padding: 0px; line-height: 1.5; color: #0066a7;">http://210.21.117.86/down/ocx/winxpddk.zip</span></a></span></p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 19px; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #fefef2;">&nbsp;&nbsp;&nbsp; 装完后跑去<span style="margin: 0px; padding: 0px; line-height: 1.5; color: #888888;"><a href="http://download.csdn.net/detail/rendao0563/3046836#comment">http://download.csdn.net/detail/rendao0563/3046836#comment</a>&nbsp;</span>下（可以直接点）</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px 0px 0px 60px; line-height: 19px; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #fefef2;"><span style="margin: 0px; padding: 0px; line-height: 1.5; color: #888888;"><font color="#075db3">ddkwizard_setup.exe</font>&nbsp;<font color="#075db3">ddkbuild_bat.zip</font>&nbsp;<font color="#075db3">ddkbuild_cmd.zip</font></span></p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 19px; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #fefef2;">&nbsp;&nbsp;&nbsp; 然后把两个zip里的东西脱出来放到DDK的安装目录下，比如D:\WinDDK。接着设置环境变量，在PATH变量里加上DDKBUILD.bat 和 DDKBUILD.cmd的目录。我为了保险起见写了&#8220;D:\WinDDK;D:\WinDDK\DDKBUILD.cmd;D:\WinDDK \DDKBUILD.bat;&#8221;三个。。。改天分开测试一下。然后新建一个系统变量，<br style="margin: 0px; padding: 0px;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2000 DDK则变量名为: W2KBASE<br style="margin: 0px; padding: 0px;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XP DDK则变量名为: WXPBASE<br style="margin: 0px; padding: 0px;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2003 sp1 DDK变量名为: WNETBASE<br style="margin: 0px; padding: 0px;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 值为D:\WINDDK\2600。</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 19px; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #fefef2;">&nbsp;&nbsp;&nbsp; 接着启动vs2008 打开菜单中的工具&#8212;&#8212;选项，弹出选项对话框。选择左边的项目和解决方案&#8212;&#8212;VC++目录，在右边的显示以下内容的目录下拉列表中选择可执行文件，在下面列 表框中添加上面DDKBuild.bat文件所在的路径(比如我的D:\WinDDK)，同样，添加包含文件&#8220;D:\WINDDK\2600 \inc&#8221;&#8220;D:\WINDDK\2600\inc\wxp&#8221;&#8220;D:\WINDDK\2600\inc\ddk\wxp&#8221;，添加库文件&#8220;D: \WINDDK\2600\lib\wxp\i386&#8221;。</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 19px; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #fefef2;">&nbsp;&nbsp;&nbsp; 设置好后把VS关了装DDKWizard装完后打开VS就可以直接建立DDK项目了<br style="margin: 0px; padding: 0px;" /><img src="http://p.blog.csdn.net/images/p_blog_csdn_net/huangchen4444/EntryImages/20090908/%E6%97%A0%E6%A0%87%E9%A2%98633880494533281250.jpg" alt="" height="187" width="622" style="margin: 0px; padding: 0px; border: 0px;" /></p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 19px; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #fefef2;">&nbsp;&nbsp;&nbsp; 好了测试，编译通过~</p><img src ="http://www.cppblog.com/hongfei/aggbug/201089.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/hongfei/" target="_blank">曾是土木人</a> 2013-06-17 17:12 <a href="http://www.cppblog.com/hongfei/archive/2013/06/17/201089.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>