求组,驱动编程的有关问题,很简单的,帮忙下噶,多谢了哈

求组,驱动编程的问题,很简单的,大虾帮忙下噶,谢谢了哈
errors in directory c:\test
NMAKE : fatal error U1002: syntax error :invalid macro invocation '$'
nmake.exe / nologo BUILDMSG=Stop . -i BUILD_PASS=PASS2 LINKONLY=1 NOPASS0=1 MAKEDIR_RELATIVE_TO_BASEDIR= failed - rc = 2

这里的错误是什么啊?


#include <ntddk.h>

VOID DriverUnload(PDRIVER_OBJECT driver)
{
  DbgPrint("first:Our driver is unloading...\r\n");
}


NTSTATUS DriverEntry(PDRIVER_OBJECT driver, PUNICODE_STRING reg_path)
{
  DbgPrint("first:hello,my salary!");
  dirver -> DriverUnload = DriverUnload;
  return STATUS_SUCCESS;
}

这个是.c文件


TARGETNAME=first
TARGETTYPE=DRIVER
TARGETPATH=obj
SOURCES=first.c  
这个是sources 文件


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

makefile 文件

------解决方案--------------------
哈哈
寒江独钓第一个例子
------解决方案--------------------
建议用vc的环境开发,可以使用va插件,自己在vc的环境下添加include文件就有va的提示了,你那driver变量都写错了!

sources

TARGETNAME=first
TARGETTYPE=DRIVER
TARGETPATH=obj
SOURCES=test.c

makefile

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

test.c

#include <ntddk.h>

VOID DriverUnload(PDRIVER_OBJECT driver)
{
DbgPrint("first:Our driver is unloading...\r\n");
}


NTSTATUS DriverEntry(PDRIVER_OBJECT driver, PUNICODE_STRING reg_path)
{
DbgPrint("first:hello,my salary!");
driver -> DriverUnload = DriverUnload;
return STATUS_SUCCESS;
}

------解决方案--------------------
与以前的版本不同 NMAKE 版本 1.13 所有环境变量为继承的宏在初始化时都计算。 因为 $ 字符指示随后宏,NMAKE 将尝试评估最终的美元符号,在一个宏的上下文中后面的字符。例如对于使用诸如"提示 $ p $ g $"来设置系统提示,然后使用 NMAKE 1.13 之类的命令将导致此错误。