今天做一个debug OS,在eboot下download os image,通过ethernet进行kitl的debug,在buld debug OS时遇到下面这个错误
" error LNK2001: unresolved external symbol dpCurSettings"
注:这个错误如果是编译release版本的就不会有问题
其实很简单,dpCurSettings是一个数组变量,在这里没有定义或声明,定义或声明下就好了
#ifdef DEBUG
DBGPARAM dpCurSettings = {
TEXT("CCID"),
{
TEXT("Init"), TEXT("Unused"), TEXT("Unused"), TEXT("Unused"),
TEXT("Unused"), TEXT("Unused"), TEXT("Unused"), TEXT("Unused"),
TEXT("Unused"), TEXT("Unused"), TEXT("Unused"), TEXT("Misc"),
TEXT("Unused"), TEXT("Function"), TEXT("Warning"), TEXT("Error")
},
0
};
#endif
下面是MSDN上对这个数据类型的介绍:
http://technet.microsoft.com/zh-cn/aa451060(en-us).aspx
This structure is used with RegisterDbgZones to specify debug zone information for a process or DLL.
- typedef struct _DBGPARAM {
- WCHAR lpszName[32];
- WCHAR rglpszZones[16][32];
- ULONG ulZoneMask;
- } DBGPARAM, *LPDBGPARAM;
Members
-
lpszName
- Name of module. The name can be a maximum of 31 characters plus a terminating NULL. rglpszZones
- Names of zones for first 16 bits. Each zone name can be a maximum of 31 characters plus a terminating NULL. ulZoneMask
- Current zone mask. This value defines which zones are enabled by default for the module.
Remarks
The name of the module is used to look for zone initialization information in the registry of the host PC and in the registry of the target device. Zone names are displayed by the control application that allows the user to dynamically set zones.
For more information, see DBGPARAM Structure Declaration.
Requirements
OS Versions: Windows CE OS 2.10 and later
Header: Dbgapi.h
Link Library: none