hep8209365
驱动牛犊
驱动牛犊
  • 注册日期2003-02-21
  • 最后登录2004-03-03
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:3217回复:4

关于编译驱动程序时出现的问题!!!

楼主#
更多 发布于:2003-11-05 14:55
各位大侠,小弟最近编写了一个带有USB底层接口的NDIS无线网卡的驱动程序,在用DDK进行编译时源码编译已经通过了,但在链接生成*.sys文件时出现了错误,总是通不过,小弟很是着急,希望各位驱动大拿能帮帮小弟!!小弟将不胜感激!!!

我把出错的report贴在此处,请各位指点!!!



Current DDK Directory = d:\\NTDDK
Building for I386
******Configuration: myndis_wdm - Win32 Debug *************

Invalid keyboard code specified
New or updated MSVC detected.  Updating DDK environment....

Setting environment for using Microsoft Visual C++ tools.
Starting dirs creation...Completed.
BUILD: Object root set to: ==> objchk
BUILD: /i switch ignored
BUILD: Compile and Link for i386
BUILD: Loading d:\\NTDDK\\build.dat...
BUILD: Computing Include file dependencies:
BUILD: c:\\program files\\microsoft visual studio\\vc98\\include\\exdisp.odl(31): c:\\program files\\microsoft visual studio\\vc98\\include\\exdisp.odl - invalid include statement: importlib(STDOLE_TLB);
BUILD: c:\\program files\\microsoft visual studio\\vc98\\include\\vidsvr.odl(16): c:\\program files\\microsoft visual studio\\vc98\\include\\vidsvr.odl - invalid include statement: importlib(STDOLE_TLB);
BUILD: c:\\progra~1\\micros~2\\vc98\\include\\exdisp.odl(31): c:\\progra~1\\micros~2\\vc98\\include\\exdisp.odl - invalid include statement: importlib(STDOLE_TLB);
BUILD: c:\\progra~1\\micros~2\\vc98\\include\\vidsvr.odl(16): c:\\progra~1\\micros~2\\vc98\\include\\vidsvr.odl - invalid include statement: importlib(STDOLE_TLB);
BUILD: Examining d:\\ntddk\\myndis~1 directory for files to compile.
    d:\\ntddk\\myndis~1
    d:\\ntddk\\myndis~1 - 6 source files (4,912 lines)
BUILD: Saving d:\\NTDDK\\build.dat...
BUILD: Compiling d:\\ntddk\\myndis~1 directory
Compiling - debug.cpp for i386
Compiling - receive.cpp for i386
Compiling - request.cpp for i386
Compiling - rwusb.cpp for i386
Compiling - send.cpp for i386
Compiling - usb_wirlessadapter.cpp for i386
BUILD: Linking d:\\ntddk\\myndis~1 directory
Linking Executable - objchk\\i386\\usbwirlesslan.sys for i386
send.obj() : error LNK2001: unresolved external symbol \"unsigned long __cdecl DbgPrint(char *,...)\" (?DbgPrint@@YAKPADZZ)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"unsigned long __cdecl DbgPrint(char *,...)\" (?DbgPrint@@YAKPADZZ)
debug.obj() : error LNK2001: unresolved external symbol \"unsigned long __cdecl DbgPrint(char *,...)\" (?DbgPrint@@YAKPADZZ)
receive.obj() : error LNK2001: unresolved external symbol \"unsigned long __cdecl DbgPrint(char *,...)\" (?DbgPrint@@YAKPADZZ)
request.obj() : error LNK2001: unresolved external symbol \"unsigned long __cdecl DbgPrint(char *,...)\" (?DbgPrint@@YAKPADZZ)
rwusb.obj() : error LNK2001: unresolved external symbol \"unsigned long __cdecl DbgPrint(char *,...)\" (?DbgPrint@@YAKPADZZ)
receive.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) unsigned long __stdcall NdisInterlockedIncrement(long *)\" (__imp_?NdisInterlockedIncrement@@YGKPAJ@Z)
receive.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) long __fastcall InterlockedExchange(long *,long)\" (__imp_?InterlockedExchange@@YIJPAJJ@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) long __fastcall InterlockedExchange(long *,long)\" (__imp_?InterlockedExchange@@YIJPAJJ@Z)
send.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) long __fastcall InterlockedExchange(long *,long)\" (__imp_?InterlockedExchange@@YIJPAJJ@Z)
receive.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisFreeBuffer(struct _MDL *)\" (__imp_?NdisFreeBuffer@@YGXPAU_MDL@@@Z)
receive.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisUnchainBufferAtFront(struct _NDIS_PACKET *,struct _MDL * *)\" (__imp_?NdisUnchainBufferAtFront@@YGXPAU_NDIS_PACKET@@PAPAU_MDL@@@Z)
receive.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisAllocateBuffer(int *,struct _MDL * *,void *,void *,unsigned int)\" (__imp_?NdisAllocateBuffer@@YGXPAHPAPAU_MDL@@PAX2I@Z)
request.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisGetCurrentSystemTime(union _LARGE_INTEGER *)\" (__imp_?NdisGetCurrentSystemTime@@YGXPAT_LARGE_INTEGER@@@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisGetCurrentSystemTime(union _LARGE_INTEGER *)\" (__imp_?NdisGetCurrentSystemTime@@YGXPAT_LARGE_INTEGER@@@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) long __stdcall PsCreateSystemThread(void * *,unsigned long,struct _OBJECT_ATTRIBUTES *,void *,struct _CLIENT_ID *,void (__stdcall*)(void *),void *)\" (__imp_?PsCreateSystemThread@@YGJPAPAXKPAU_OBJECT_ATTRIBUTES@@PAXPAU_CLIENT_ID@@P6GX2@Z2@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) long __fastcall IofCallDriver(struct _DEVICE_OBJECT *,struct _IRP *)\" (__imp_?IofCallDriver@@YIJPAU_DEVICE_OBJECT@@PAU_IRP@@@Z)
send.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) long __fastcall IofCallDriver(struct _DEVICE_OBJECT *,struct _IRP *)\" (__imp_?IofCallDriver@@YIJPAU_DEVICE_OBJECT@@PAU_IRP@@@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) struct _IRP * __stdcall IoAllocateIrp(char,unsigned char)\" (__imp_?IoAllocateIrp@@YGPAU_IRP@@DE@Z)
send.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) struct _IRP * __stdcall IoAllocateIrp(char,unsigned char)\" (__imp_?IoAllocateIrp@@YGPAU_IRP@@DE@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall KeClearEvent(struct _KEVENT *)\" (__imp_?KeClearEvent@@YGXPAU_KEVENT@@@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) unsigned char __stdcall KeGetCurrentIrql(void)\" (__imp_?KeGetCurrentIrql@@YGEXZ)
send.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) unsigned char __stdcall KeGetCurrentIrql(void)\" (__imp_?KeGetCurrentIrql@@YGEXZ)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) long __stdcall KeSetEvent(struct _KEVENT *,long,unsigned char)\" (__imp_?KeSetEvent@@YGJPAU_KEVENT@@JE@Z)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) long __stdcall KeSetEvent(struct _KEVENT *,long,unsigned char)\" (__imp_?KeSetEvent@@YGJPAU_KEVENT@@JE@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall IoFreeIrp(struct _IRP *)\" (__imp_?IoFreeIrp@@YGXPAU_IRP@@@Z)
send.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall IoFreeIrp(struct _IRP *)\" (__imp_?IoFreeIrp@@YGXPAU_IRP@@@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"void * __stdcall MemAlloc(unsigned int)\" (?MemAlloc@@YGPAXI@Z)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"void * __stdcall MemAlloc(unsigned int)\" (?MemAlloc@@YGPAXI@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall ExFreePool(void *)\" (__imp_?ExFreePool@@YGXPAX@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) struct _URB * __stdcall USBD_CreateConfigurationRequestEx(struct _USB_CONFIGURATION_DESCRIPTOR *,struct _USBD_INTERFACE_LIST_ENTRY *)\" (__imp_?USBD_CreateConfigurationRequestEx@@YGPAU_URB@@PAU_USB_CONFIGURATION_DESCRIPTOR@@PAU_USBD_INTERFACE_LIST_ENTRY@@@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) struct _USB_INTERFACE_DESCRIPTOR * __stdcall USBD_ParseConfigurationDescriptorEx(struct _USB_CONFIGURATION_DESCRIPTOR *,void *,long,long,long,long,long)\" (__imp_?USBD_ParseConfigurationDescriptorEx@@YGPAU_USB_INTERFACE_DESCRIPTOR@@PAU_USB_CONFIGURATION_DESCRIPTOR@@PAXJJJJJ@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) unsigned char __stdcall IoCancelIrp(struct _IRP *)\" (__imp_?IoCancelIrp@@YGEPAU_IRP@@@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisMSleep(unsigned long)\" (__imp_?NdisMSleep@@YGXK@Z)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisMSleep(unsigned long)\" (__imp_?NdisMSleep@@YGXK@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) long __stdcall KeWaitForSingleObject(void *,enum _KWAIT_REASON,char,unsigned char,union _LARGE_INTEGER *)\" (__imp_?KeWaitForSingleObject@@YGJPAXW4_KWAIT_REASON@@DEPAT_LARGE_INTEGER@@@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) long __stdcall PsTerminateSystemThread(long)\" (__imp_?PsTerminateSystemThread@@YGJJ@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) long __stdcall KeSetPriorityThread(struct _KTHREAD *,long)\" (__imp_?KeSetPriorityThread@@YGJPAU_KTHREAD@@J@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"struct _KTHREAD * __stdcall KeGetCurrentThread(void)\" (?KeGetCurrentThread@@YGPAU_KTHREAD@@XZ)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall KeInitializeEvent(struct _KEVENT *,enum _EVENT_TYPE,unsigned char)\" (__imp_?KeInitializeEvent@@YGXPAU_KEVENT@@W4_EVENT_TYPE@@E@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) long __fastcall InterlockedIncrement(long *)\" (__imp_?InterlockedIncrement@@YIJPAJ@Z)
send.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) long __fastcall InterlockedIncrement(long *)\" (__imp_?InterlockedIncrement@@YIJPAJ@Z)
rwusb.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) long __fastcall InterlockedDecrement(long *)\" (__imp_?InterlockedDecrement@@YIJPAJ@Z)
send.obj() : error LNK2001: unresolved external symbol \"long __stdcall UsbIoCompleteWrite(struct _DEVICE_OBJECT *,struct _IRP *,void *)\" (?UsbIoCompleteWrite@@YGJPAU_DEVICE_OBJECT@@PAU_IRP@@PAX@Z)
send.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) unsigned long __stdcall NDIS_BUFFER_TO_SPAN_PAGES(struct _MDL *)\" (__imp_?NDIS_BUFFER_TO_SPAN_PAGES@@YGKPAU_MDL@@@Z)
send.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisQueryBufferOffset(struct _MDL *,unsigned int *,unsigned int *)\" (__imp_?NdisQueryBufferOffset@@YGXPAU_MDL@@PAI1@Z)
send.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisQueryBuffer(struct _MDL *,void * *,unsigned int *)\" (__imp_?NdisQueryBuffer@@YGXPAU_MDL@@PAPAXPAI@Z)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) int __stdcall NdisMRegisterMiniport(void *,struct _NDIS_MINIPORT_CHARACTERISTICS *,unsigned int)\" (__imp_?NdisMRegisterMiniport@@YGHPAXPAU_NDIS_MINIPORT_CHARACTERISTICS@@I@Z)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"void __stdcall MiniportReturnPacket(void *,struct _NDIS_PACKET *)\" (?MiniportReturnPacket@@YGXPAXPAU_NDIS_PACKET@@@Z)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisInitializeWrapper(void * *,void *,void *,void *)\" (__imp_?NdisInitializeWrapper@@YGXPAPAXPAX11@Z)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisMSetAttributesEx(void *,void *,unsigned int,unsigned long,enum _NDIS_INTERFACE_TYPE)\" (__imp_?NdisMSetAttributesEx@@YGXPAX0IKW4_NDIS_INTERFACE_TYPE@@@Z)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisMGetDeviceProperty(void *,struct _DEVICE_OBJECT * *,struct _DEVICE_OBJECT * *,struct _DEVICE_OBJECT * *,struct _CM_RESOURCE_LIST * *,struct _CM_RESOURCE_LIST * *)\" (__imp_?NdisMGetDeviceProperty@@YGXPAXPAPAU_DEVICE_OBJECT@@11PAPAU_CM_RESOURCE_LIST@@2@Z)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisAllocatePacket(int *,struct _NDIS_PACKET * *,void *)\" (__imp_?NdisAllocatePacket@@YGXPAHPAPAU_NDIS_PACKET@@PAX@Z)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisAllocateBufferPool(int *,void * *,unsigned int)\" (__imp_?NdisAllocateBufferPool@@YGXPAHPAPAXI@Z)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisAllocatePacketPool(int *,void * *,unsigned int,unsigned int)\" (__imp_?NdisAllocatePacketPool@@YGXPAHPAPAXII@Z)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisFreePacketPool(void *)\" (__imp_?NdisFreePacketPool@@YGXPAX@Z)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisFreePacket(struct _NDIS_PACKET *)\" (__imp_?NdisFreePacket@@YGXPAU_NDIS_PACKET@@@Z)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __cdecl NdisWriteErrorLogEntry(void *,unsigned long,unsigned long,...)\" (__imp_?NdisWriteErrorLogEntry@@YAXPAXKKZZ)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) int __stdcall NdisAllocateMemoryWithTag(void * *,unsigned int,unsigned long)\" (__imp_?NdisAllocateMemoryWithTag@@YGHPAPAXIK@Z)
usb_wirlessadapter.obj() : error LNK2001: unresolved external symbol \"__declspec(dllimport) void __stdcall NdisFreeMemory(void *,unsigned int,unsigned int)\" (__imp_?NdisFreeMemory@@YGXPAXII@Z)
objchk\\i386\\usbwirlesslan.sys() : error LNK1120: 44 unresolved externals
BUILD: Done

    6 files compiled -   350 LPS
    1 executable built - 61 Errors
Tool returned code: 0
yongliliu
驱动小牛
驱动小牛
  • 注册日期2003-10-20
  • 最后登录2007-09-28
  • 粉丝0
  • 关注0
  • 积分11分
  • 威望2点
  • 贡献值0点
  • 好评度1点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2003-11-05 16:15
好多Lib库没有指定,还说只有一个错误,我靠!!!
成功不是天上掉下来的免费的丰盛的晚餐!
hep8209365
驱动牛犊
驱动牛犊
  • 注册日期2003-02-21
  • 最后登录2004-03-03
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2003-11-05 16:24
还需要什么库??
请具体说明好吗?
谢谢!!!!!!!!
liulin
驱动牛犊
驱动牛犊
  • 注册日期2003-01-28
  • 最后登录2009-06-19
  • 粉丝0
  • 关注0
  • 积分2分
  • 威望1点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地板#
发布于:2003-11-05 16:36
缺ndis方面的.lib
hep8209365
驱动牛犊
驱动牛犊
  • 注册日期2003-02-21
  • 最后登录2004-03-03
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2003-11-06 10:08
我在source文件里加载的库有:


TARGETLIBS=$(DDK_LIB_PATH)\\ndis.lib \\
  $(DDK_LIB_PATH)\\ntoskrnl.lib \\
  $(DDK_LIB_PATH)\\usbd.lib \\
           $(DDK_LIB_PATH)\\wdm.lib \\
           $(DDK_LIB_PATH)\\ntdll.lib \\
           $(DDK_LIB_PATH)\\ndispnp.lib

但编译时还是出现了以前的问题,小弟实在是不知如何是好,拜托各位大哥全力相助,帮我解决一下!!
游客

返回顶部