阅读:3236回复:2
编译提示没有ZONE_THREAD的问题
今天用PB5.0编译一个wince内核,编译debug模式,但是在编译到camera驱动的提示错误,PB的build窗口提示如下:
BUILD: [00:0000000951:PROGC ] Compiling \WINCE500\PLATFORM\SMDK2440A\Src\Drivers\camera\ directory. BUILD: [01:0000000958:PROGC ] Compiling .\camera.cpp BUILD: [01:0000000961:ERRORE] c:\WINCE500\PLATFORM\SMDK2440A\Src\Drivers\camera\camera.cpp(769) : error C2065: 'ZONE_THREAD' : undeclared identifier BUILD: [01:0000000962:ERRORE] c:\WINCE500\PLATFORM\SMDK2440A\Src\Drivers\camera\camera.cpp(772) : error C3861: 'ZONE_THREAD': identifier not found, even with argument-dependent lookup BUILD: [01:0000000963:ERRORE] c:\WINCE500\PLATFORM\SMDK2440A\Src\Drivers\camera\camera.cpp(1023) : error C2065: 'ZONE_ERR' : undeclared identifier BUILD: [01:0000000964:PROGC ] Linking C:\WINCE500\platform\smdk2440a\lib\ARMV4I\debug\camera.lib BUILD: [01:0000000974:ERRORE] LINK : fatal error LNK1181: cannot open input file 'obj\ARMV4I\debug\camera.obj' 定位到camera.cpp,文件的内容如下: #include <windows.h> #include <nkintr.h> //#include <oalintr.h> #include <pm.h> #include "pmplatform.h" #include <ceddk.h> #include <s3c2440a.h> #include <bsp.h> #include "camif.h" #include "camera.h" #include "s5x532.h" .............. BOOL WINAPI DllEntry(HANDLE hinstDLL, DWORD dwReason, LPVOID /* lpvReserved */) { switch(dwReason) { case DLL_PROCESS_ATTACH: DEBUGREGISTER((HINSTANCE)hinstDLL); DEBUGMSG(ZONE_INIT,(TEXT("CAMERA: DLL_PROCESS_ATTACH\r\n"))); return TRUE; case DLL_THREAD_ATTACH: DEBUGMSG(ZONE_THREAD,(TEXT("CAMERA: DLL_THREAD_ATTACH\r\n"))); break; case DLL_THREAD_DETACH: DEBUGMSG(ZONE_THREAD,(TEXT("CAMERA: DLL_THREAD_DETACH\r\n"))); break; case DLL_PROCESS_DETACH: DEBUGMSG(ZONE_INIT,(TEXT("CAMERA: DLL_PROCESS_DETACH\r\n"))); break; #ifdef UNDER_CE case DLL_PROCESS_EXITING: DEBUGMSG(ZONE_INIT,(TEXT("CAMERA: DLL_PROCESS_EXITING\r\n"))); break; case DLL_SYSTEM_STARTED: DEBUGMSG(ZONE_INIT,(TEXT("CAMERA: DLL_SYSTEM_STARTED\r\n"))); break; #endif } return TRUE; } ...... 可以看到里面有ZONE_INIT,但是编译器没有提示错误,不知道这些是在那里定义的定义,我根据文件包含的头文件没有找到ZONE_INIT的定义,但是没有提示错误,说明肯定有地方定义了。 还有如果我自己定义ZONE_THREAD,要怎样定义,定义到那个文件的那个的地方最好呢,希望高手们帮忙解决 |
|
沙发#
发布于:2008-10-13 16:26
camera.cpp开头添加:
#define ZONE_ERR 1 #define ZONE_THREAD 1 |
|
板凳#
发布于:2008-10-15 09:58
谢谢,好久没上网了,根据你的提示,上面的问题解决了
|
|