首页
社区
课程
招聘
[求助]DDK编译问题
发表于: 2008-8-30 19:30 4986

[求助]DDK编译问题

2008-8-30 19:30
4986
RT,本人刚开始接触DDK,试着书上的一个例子写下来,到编译阶段,build后找不到应该生成的二进制文件,编译信息如下
F:\Projects\DDK\HelloDDK>build
BUILD: Object root set to: ==> objchk
BUILD: Adding /Y to COPYCMD so xcopy ops won't hang.
BUILD: /i switch ignored
BUILD: Using 2 child processes
BUILD: Compile and Link for i386
BUILD: Loading C:\WINDDK\2600\build.dat...
BUILD: Computing Include file dependencies:
BUILD: Examining f:\projects\ddk\helloddk directory for files to compile.
BUILD: Linking f:\projects\ddk\helloddk directory
BUILD: nmake.exe /c BUILDMSG=Stop. -i LINKONLY=1 NOPASS0=1 NTTEST= UMTEST= 386=1
failed - rc = 2
BUILD: Done

上网找也没看到解决方法,就在这边问了,先谢啦

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
免费 0
支持
分享
最新回复 (5)
雪    币: 615
活跃值: (1127)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
2
To develop a driver that will run on multiple Windows operating systems, use a single set of source files and create a single binary. However, sometimes it is not possible to generate a single binary that supports all target operating systems. Nevertheless, in such a case you should use the same source code and build the drivers as follows:

Surround any system-dependent features with conditional compilation directives.
Put all source files in one directory; for example, mydriver.
Create a subdirectory for each target operating system. For example:
mydriver\Windows2000
mydriver\WindowsMe
mydriver\XP

In each system-specific subdirectory, put the makefile, makefile.inc, and other system-dependent build files:
mydriver\Windows2000\makefile
mydriver\Windows2000\makefile.inc

mydriver\WindowsMe\makefile
mydriver\WindowsMe\makefile.inc

mydriver\XP\makefile
mydriver\XP\makefile.inc

In each system-specific subdirectory, create a sources file that refers to the source files in the parent directory, as in the following example:
TARGETNAME=MYDRIVER
TARGETTYPE=DRIVER
DRIVERTYPE=WDM

C_DEFINES=-DDRIVER

INCLUDES=..\..\inc;

SOURCES= \
        ..\main.c \
        ..\vars.c \

This sources file creates a WDM driver named MYDRIVER, using source files from the parent directory and header files from an inc directory at the same level as the parent directory. Output files are placed in a subdirectory whose name is based on the build environment type, the platform, and the Windows version for which they are built. Log files use a similar naming scheme. See Specifying the Location of Created Files for details.

更详细信息请翻阅WDK Documentation  :)
2008-8-30 20:17
0
雪    币: 331
活跃值: (57)
能力值: ( LV7,RANK:100 )
在线值:
发帖
回帖
粉丝
3
都BUILD: Done了会没有二进制文件的啊,,可能放在别的目录里了,找找
2008-8-30 20:48
0
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
解决了。。。是sources文件写错了。。。没包含一个东东。。。
2008-8-30 21:36
0
雪    币: 215
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
把你的source文件发出来看看
2008-8-30 21:51
0
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
偶也遇到这个问题啦, 关注中。。。。
2008-11-19 14:59
0
游客
登录 | 注册 方可回帖
返回
//