引用 22 楼 xdkui 的回复:
F:\WINCE600\public\common\oak\inc\winddi.h(88)行的内容是什么?
F:\WINCE600\public\common\oak\inc\winddi.h(420)?
main.c改名成main.cpp可以吗?
谢谢楼上xdkui,非常感谢,我现在将问题描述如下:
1、F:\WINCE600\public\common\oak\inc\winddi.h(88)行的内容是(红色字体代表是那一行):typedef LONG FIX;
2、F:\WINCE600\public\common\oak\inc\winddi.h(420)行内容是(红色字体代表是那一行):
#if DDI // Must be set when compiling driver
#define LEFTENTRY (*
#define RIGHTENTRY )
DEFINE_GDI_ENTRY_POINTS(extern,LEFTENTRY,RIGHTENTRY)
#else
DEFINE_GDI_ENTRY_POINTS(EMPTYPARM,APIENTRY,EMPTYPARM)
#endif
3、main.c改名成main.cpp是不行的,我main里面的函数都不是以类的形式,.cpp是类函数形式的。
4、main.c包含了的头文件如下:
#include "bsp.h"
#include
#pragma warning(push)
#pragma warning(disable: 4115)
#include
#pragma warning(pop)
#include "loader.h"
#include "sdfmd.h"
#include "bitmap.h"
#include "precomp.h"
说明:#include "precomp.h"是我加进去的,只要加进去了编译就出错的,bsp.h中包含了windows.h 文件。
5、precomp.h文件中内容如下:
#pragma warning(push)
#pragma warning(disable: 4201)
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#pragma warning(pop)
#include "bsp.h"
#if !defined(BSP_POCKETPC) && !defined(BSP_SMARTPHONE) && !(UNDER_CE >= 600)
#include "ddgpeuser.h"
#endif
#if defined(USE_C2D_ROUTINES)
#include "c2d_api.h"
#include "c2d_mutex.h"
// Macros
#define C2D_CALL(f) \
{ \
status = f; \
if (status != C2D_STATUS_OK) \
return status; \
}
#define ON_ERROR_EXIT_AND_LOG(f, msg) \
{ \
status = f; \
if (status != C2D_STATUS_OK) \
{ \
C2D_EXIT; \
ERRORMSG(1, (msg)); \
return C2DStatusToScode(status); \
} \
}
#define C2D_UNKNOWNFORMAT C2D_COLOR_8888_RGBA
const C2D_COLORFORMAT EDDGPEPixelFormatToC2DFormat[] = {
C2D_COLOR_A1, //ddgpePixelFormat_1bpp = 0,
C2D_UNKNOWNFORMAT, //ddgpePixelFormat_2bpp,
C2D_COLOR_A4, //ddgpePixelFormat_4bpp,
C2D_COLOR_8, //ddgpePixelFormat_8bpp,
C2D_COLOR_0565, //ddgpePixelFormat_565,
C2D_COLOR_1555, //ddgpePixelFormat_5551,
C2D_COLOR_4444, //ddgpePixelFormat_4444,
C2D_COLOR_1555, //ddgpePixelFormat_5550,
C2D_COLOR_8888, //ddgpePixelFormat_8880,
C2D_COLOR_8888, //ddgpePixelFormat_8888,
C2D_COLOR_YVYU, //ddgpePixelFormat_YUYV422,C2D_UNKNOWNFORMAT,//
C2D_COLOR_UYVY, //ddgpePixelFormat_UYVY422,C2D_UNKNOWNFORMAT,//
C2D_COLOR_YUY2, //ddgpePixelFormat_YUY2422,C2D_UNKNOWNFORMAT,//
C2D_UNKNOWNFORMAT, //ddgpePixelFormat_YV12,
C2D_UNKNOWNFORMAT, //ddgpePixelFormat_15bppGeneric,
C2D_UNKNOWNFORMAT, //ddgpePixelFormat_16bppGeneric,
C2D_COLOR_8888, //ddgpePixelFormat_24bppGeneric,
C2D_COLOR_8888, //ddgpePixelFormat_32bppGeneric,
C2D_UNKNOWNFORMAT //ddgpePixelFormat_UnknownFormat,
};
#endif //#if defined(USE_C2D_ROUTINES)
#include "ipu.h"
#include "adc.h"
#include "sdc.h"
#include "dirtyrect.h"
#include "pp.h"
#include "ddipu.h"
6、bsp.h中内容如下:
#ifndef __BSP_H
#define __BSP_H
//------------------------------------------------------------------------------
#if __cplusplus
extern "C" {
#endif
//------------------------------------------------------------------------------
#pragma warning(push)
#pragma warning(disable: 4115 4201 4204 4214)
#include
#include
#include
#include "oal.h"
#pragma warning(pop)
// Processor Definitions
#include "csp.h"
// Custom OAL Definitions
#include "oal_iomux.h"
// Configuration Files
#include "args.h"
#include "bsp_clocks.h"
#include "bsp_cfg.h"
#include "bsp_base_reg_cfg.h"
#include "ioctl_cfg.h"
#include "image_cfg.h"
// Board Level Definitions
#include "cpld.h"
//------------------------------------------------------------------------------
#if __cplusplus
}
#endif
#endif