VC6+DDK编译环境配置

 

1.使用VC6IDE创建一个makefile项目[TestDrv]
2.添加TestDrv.h,TestDrv.cpp并编写代码,代码内容略
3.设置项目,选择菜单[Project]->Settings

    Command Line:
    MakeDrv D:\WINDDK\2600 fre

    Rebuild All Options:
    -nmake /a

    Output File Name:
    TestDrv.sys

4. 在项目目录下创建一个 MakeDrv.bat

@echo off
if "%1"=="" goto usage
if "%2"=="" goto usage
if not exist %1\bin\setenv.bat goto usage
set ProjectDir=%cd%
call %1\bin\setenv %1 %2
%ProjectDir:~0,2%
cd %ProjectDir%
build -b -w %3 %4 %5 %6 %7
goto exit

:usage
echo usage   MakeDrv DDK_dir fre/chk [build_options]
:exit

5. 创建一个makefile文件,下面是文件内容,内容固定。

#
# DO NOT EDIT THIS FILE!!!  Edit .\sources. if you want to add a new source
# file to this component.  This file merely indirects to the real make file
# that is shared by all the components of NT OS/2
#
!INCLUDE $(NTMAKEENV)\makefile.def

6. 创建一个sources文件,下面是文件内容.

TARGETNAME=TestDrv
TARGETTYPE=DRIVER
TARGETPATH=obj

INCLUDES=.\
SOURCES = TestDrv.c

7.现在就可以编译了.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值