z13455525731
驱动牛犊
驱动牛犊
  • 注册日期2005-03-10
  • 最后登录2009-07-02
  • 粉丝0
  • 关注0
  • 积分107分
  • 威望20点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1262回复:3

将语法错误找出后编译器显示错误

楼主#
更多 发布于:2005-04-28 11:33
将pnp,power等屏蔽打开了driverentry,adddevice,deviceunload
三个代码改掉语法错误出现以下错误,第一次编写驱动请大家多多指正。
D:\\pci\\wes3virge\\vv>build
BUILD: Object root set to: ==> objchk
BUILD: /i switch ignored
BUILD: Compile and Link for i386
BUILD: Loading d:\\EEFILE\\NTDDK\\build.dat...
BUILD: Computing Include file dependencies:
BUILD: Examining d:\\pci\\wes3virge\\vv directory for files to compile.
    d:\\pci\\wes3virge\\vv - 1 source files (57 lines)
BUILD: Saving d:\\EEFILE\\NTDDK\\build.dat...
BUILD: Compiling d:\\pci\\wes3virge\\vv directory
Compiling - thisinit.cpp for i386
BUILD: Linking d:\\pci\\wes3virge\\vv directory
Linking Executable - objchk\\i386\\objfre.sys for i386
link() : error LNK2001: unresolved external symbol _DriverEntry@8
pnp.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) voi
d __stdcall IoDeleteDevice(struct _DEVICE_OBJECT *)\" (__imp_?IoDeleteDevice@@YGX
PAU_DEVICE_OBJECT@@@Z)
pnp.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) voi
d __stdcall IoDetachDevice(struct _DEVICE_OBJECT *)\" (__imp_?IoDetachDevice@@YGX
PAU_DEVICE_OBJECT@@@Z)
pnp.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) voi
d __stdcall RtlFreeUnicodeString(struct _UNICODE_STRING *)\" (__imp_?RtlFreeUnico
deString@@YGXPAU_UNICODE_STRING@@@Z)
thisinit.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport
) void __stdcall RtlFreeUnicodeString(struct _UNICODE_STRING *)\" (__imp_?RtlFree
UnicodeString@@YGXPAU_UNICODE_STRING@@@Z)
pnp.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) uni
on _POWER_STATE  __stdcall PoSetPowerState(struct _DEVICE_OBJECT *,enum _POWER_S
TATE_TYPE,union _POWER_STATE)\" (__imp_?PoSetPowerState@@YG?AT_POWER_STATE@@PAU_D
EVICE_OBJECT@@W4_POWER_STATE_TYPE@@T1@@Z)
pnp.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) lon
g __stdcall IoSetDeviceInterfaceState(struct _UNICODE_STRING *,unsigned char)\" (
__imp_?IoSetDeviceInterfaceState@@YGJPAU_UNICODE_STRING@@E@Z)
pnp.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) str
uct _DEVICE_OBJECT * __stdcall IoAttachDeviceToDeviceStack(struct _DEVICE_OBJECT
 *,struct _DEVICE_OBJECT *)\" (__imp_?IoAttachDeviceToDeviceStack@@YGPAU_DEVICE_O
BJECT@@PAU1@0@Z)
pnp.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) lon
g __stdcall IoRegisterDeviceInterface(struct _DEVICE_OBJECT *,struct _GUID const
 *,struct _UNICODE_STRING *,struct _UNICODE_STRING *)\" (__imp_?IoRegisterDeviceI
nterface@@YGJPAU_DEVICE_OBJECT@@PBU_GUID@@PAU_UNICODE_STRING@@2@Z)
pnp.obj() : error LNK2001: unresolved external symbol _GUID_INTERFACE_PCI9052Dem
o
pnp.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) voi
d __stdcall KeInitializeDpc(struct _KDPC *,void (__stdcall*)(struct _KDPC *,void
 *,void *,void *),void *)\" (__imp_?KeInitializeDpc@@YGXPAU_KDPC@@P6GX0PAX11@Z1@Z
)
pnp.obj() : error LNK2001: unresolved external symbol \"void __stdcall DpcForIsr(
struct _KDPC *,struct _DEVICE_OBJECT *,struct _IRP *,struct _DEVICE_EXTENTION *)
\" (?DpcForIsr@@YGXPAU_KDPC@@PAU_DEVICE_OBJECT@@PAU_IRP@@PAU_DEVICE_EXTENTION@@@Z
)
pnp.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) voi
d __stdcall KeInitializeEvent(struct _KEVENT *,enum _EVENT_TYPE,unsigned char)\"
(__imp_?KeInitializeEvent@@YGXPAU_KEVENT@@W4_EVENT_TYPE@@E@Z)
pnp.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) lon
g __stdcall IoCreateDevice(struct _DRIVER_OBJECT *,unsigned long,struct _UNICODE
_STRING *,unsigned long,unsigned long,unsigned char,struct _DEVICE_OBJECT * *)\"
(__imp_?IoCreateDevice@@YGJPAU_DRIVER_OBJECT@@KPAU_UNICODE_STRING@@KKEPAPAU_DEVI
CE_OBJECT@@@Z)
thisinit.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport
) void __stdcall RtlCopyUnicodeString(struct _UNICODE_STRING *,struct _UNICODE_S
TRING *)\" (__imp_?RtlCopyUnicodeString@@YGXPAU_UNICODE_STRING@@0@Z)
thisinit.obj() : error LNK2001: unresolved external symbol _servkey
thisinit.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport
) void * __stdcall ExAllocatePoolWithTag(enum _POOL_TYPE,unsigned long,unsigned
long)\" (__imp_?ExAllocatePoolWithTag@@YGPAXW4_POOL_TYPE@@KK@Z)
thisinit.obj() : error LNK2001: unresolved external symbol _DebugPrint
thisinit.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport
) unsigned char __stdcall IoIsWdmVersionAvailable(unsigned char,unsigned char)\"
(__imp_?IoIsWdmVersionAvailable@@YGEEE@Z)
objchk\\i386\\objfre.sys() : error LNK1120: 18 unresolved externals
BUILD: Done

    1 file compiled -    57 LPS
    1 executable built - 20 Errors
idaxsy
驱动大牛
驱动大牛
  • 注册日期2004-12-09
  • 最后登录2006-03-17
  • 粉丝0
  • 关注0
  • 积分386分
  • 威望54点
  • 贡献值0点
  • 好评度8点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2005-04-28 13:21
你是使用c还是使用c++呢?
[b]万水千山总是情,回个帖子行不行?[/b]
z13455525731
驱动牛犊
驱动牛犊
  • 注册日期2005-03-10
  • 最后登录2009-07-02
  • 粉丝0
  • 关注0
  • 积分107分
  • 威望20点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2005-04-28 13:54
我使用C  visual C++环境使用WINDOWS2000 DDK编译环境build命令进行编译。
Extern \"C\"
NTSTATUS DriverEntry(){}

gjltce
驱动小牛
驱动小牛
  • 注册日期2003-07-05
  • 最后登录2011-12-10
  • 粉丝0
  • 关注0
  • 积分9分
  • 威望59点
  • 贡献值0点
  • 好评度25点
  • 原创分0分
  • 专家分0分
地板#
发布于:2005-04-30 09:08
为了不必要的麻烦. 最好只用 C 编写驱动程序.不要用C++.
游客

返回顶部