我的第一个驱动程序 [英] my first driver program

查看:81
本文介绍了我的第一个驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个问题,希望得到您的答复.

我的问题是:
我开始在驱动程序编程中编写我的第一个程序.
该程序是关于你好单词"的

我已经安装了VS2010和WDK以启动.

但是不幸的是,我在编译程序时出现了一个问题.

错误是这样的:

Hello everyone,

I have a question and I hope to be answered by you.

My question is :
I started to write my first program in driver programming.
The program is about "Hello word"

I have installeed VS2010 and WDK to start .

But unfortunately I have a problem that appears when I was compiling my program.

The error is like this:

1>------ Build started: Project: driver, Configuration: Debug Win32 ------
1>  test1.c
1>c:\winddk\7600.16385.1\inc\ddk\wdm.h(14196): fatal error C1189: #error :  "No target architecture defined"
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



我需要针对此问题的解决方案,请



I need a solution for this problem, Please

推荐答案

尽管这是一个老问题,但正确的答案是使用OSR中的DDKBuild.cmd来构建您的驱动程序Visual Studio.

-此处的链接为"http://www.osronline.com/article.cfm?article=43"

以下是使用VS2010和WDK生成驱动程序的步骤.

1.安装VS
2.安装WDK
3.设置WDK环境-BASEDIR env变量
4.创建一个Make项目-创建SOURCES,DIRS和其他驱动程序所需的文件.
5.打开项目属性页,将构建命令设置为使用DDKBuild.cmd(检查DDKBUILD的命令选项)
6.通过使用"fre"构建选项重复步骤5,创建一个RELEASE构建.

现在,您可以使用VS中的build命令来构建驱动程序.有关详细信息,请使用Google"ddkbuild"以获得结果.

注意:先前的回答说您不需要VS来构建正确的驱动程序;但是,如果您想要一个不错的编辑器来查看代码和其他编辑,使用VS来构建驱动程序会使您的生活更轻松.
*一个家伙抱怨说这个答案与第一个答案相同.显然他没有阅读并理解第一个答案的含义.我的观点是:不要再向人们指出微软的半生半熟的解决方案.使用OSR批处理文件,省去一些麻烦.
Although this is an old question but the correct answer is to use the DDKBuild.cmd from OSR to build your driver with Visual Studio.

- The link is here "http://www.osronline.com/article.cfm?article=43"

Here are the steps to use VS2010 and WDK to build driver.

1. Install VS
2. Install WDK
3. Setup the WDK environment - BASEDIR env variable
4. Create a Make project - create the SOURCES, DIRS and other driver required files.
5. Open the project property page, set the build command to use the DDKBuild.cmd (check the DDKBUILD for the command options)
6. Create a RELEASE build by repeat the step #5 with the "fre" build option.

Now you can use the build command from VS to build the driver. For detailed information, google "ddkbuild" for results.

Notes: the previous answer said you do not need VS to build driver which is correct; but using VS to build driver make your life easier if you want a nice editor to look at the code and other editings.
* A dude complained that this answer is the same as the 1st one. Obviously he did not read and understand what the 1st answer meant. My point: stop pointing people the Microsoft half-baked solution. Use the OSR batch file and save yourself some headaches.


您不需要Visual Studio来构建驱动程序.
驱动程序通常是使用构建实用程序从命令行构建的,该实用程序利用了源文件.
在这里阅读有关驱动程序构建环境的信息- http://www.microsoft.com/whdc/DevTools/WDK/buildenv.mspx [ ^ ]
You do not need Visual Studio to build drivers.
Drivers are usually built from the command line using the build utility which makes use of a sources file.
Read about the driver build environment here - http://www.microsoft.com/whdc/DevTools/WDK/buildenv.mspx[^]


这篇关于我的第一个驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆