阅读:1343回复:7
求教
我用NdisAllocteMemory分配内存,程序编译后说外部连接错误,WHY!
|
|
沙发#
发布于:2003-02-11 11:32
查一下 include 的头文件,或预定义
|
|
|
板凳#
发布于:2003-02-11 12:27
在头文件中我已经包含了ndis.h
|
|
地板#
发布于:2003-02-11 12:40
NdisSetPhysicalAddressHigh (phyaddr, 0);
NdisSetPhysicalAddressLow (phyaddr, 0xffffffff); state = NdisAllocateMemory(&VirtualAddress, sizeof(VirtualAddress), 0, phyaddr); if (state == NDIS_STATUS_SUCCESS) NdisZeroMemory((PVOID)VirtualAddress, sizeof(VirtualAddress)); Linking... Control.obj : error LNK2001: unresolved external symbol \"__declspec(dllimport) int __stdcall NdisAllocateMemory(void * *,unsigned int,unsigned int,union _LARGE_INTEGER)\" (__imp_?NdisAllocateMemory@@YGHPAPAXIIT_LARGE_INTEGER@@@Z) objchk\\i386\\ISDNDriver.sys : fatal error LNK1120: 1 unresolved externals Error executing link.exe. 帮帮忙!!! |
|
地下室#
发布于:2003-02-11 15:30
我估计有以下两种可能:
1. 不是用DDK里的build 命令进行的编译,用VC等其他工具编译,是环境错误,改用DDK BUILD就好了 2. 宏定义错误 仔细看看DDK文档 |
|
|
5楼#
发布于:2003-02-11 17:37
我搞不定,你能帮我调一下吗?
|
|
6楼#
发布于:2003-02-12 17:15
谢谢,我已经搞定了! :D
|
|
7楼#
发布于:2003-02-12 17:33
这中问题自己多想一下肯定能够解决的。
|
|
|