1. make\plutommi\mmi_app\mmi_app.mak尾部添加 CFLAGS += – -gnu
2.注释掉 \plutommi\Framework\DebugLevels\DebugLevelInc\DebugInitDef_Int.h
1 #if 0 //注释 2 #ifndef __GNUC__ 3 #define MMI_TRACE_FUNC TRACE_FUNC 4 #define MMI_TRACE_STATE TRACE_STATE 5 #define MMI_TRACE_INFO TRACE_INFO 6 #define MMI_TRACE_WARNING TRACE_WARNING 7 #define MMI_TRACE_ERROR TRACE_ERROR 8 #define MMI_TRACE_G1_FRM TRACE_GROUP_1 9 #define MMI_TRACE_G2_GUI TRACE_GROUP_2 10 #define MMI_TRACE_G3_BOOTUP TRACE_GROUP_3 11 #define MMI_TRACE_G4_PHB TRACE_GROUP_4 12 #define MMI_TRACE_G5_CM TRACE_GROUP_5 13 #define MMI_TRACE_G6_SMS TRACE_GROUP_6 14 #define MMI_TRACE_G7_MISC TRACE_GROUP_7 15 #define MMI_TRACE_G8_MEDIA TRACE_GROUP_8 16 #define MMI_TRACE_G9_EMAIL TRACE_GROUP_9 17 #define MMI_TRACE_G10_RESERVED TRACE_GROUP_10 18 #define MAX_MMI_TRACE_LOG_TYPE (MMI_TRACE_G10_RESERVED+1) 19 #else /* __GNUC__ */ 20 typedef enum 21 { 22 MMI_TRACE_FUNC = 0, 23 MMI_TRACE_STATE, 24 MMI_TRACE_INFO, 25 MMI_TRACE_WARNING, 26 MMI_TRACE_ERROR, 27 28 MMI_TRACE_G1_FRM, 29 MMI_TRACE_G2_GUI, 30 MMI_TRACE_G3_BOOTUP, 31 MMI_TRACE_G4_PHB, 32 MMI_TRACE_G5_CM, 33 MMI_TRACE_G6_SMS, 34 MMI_TRACE_G7_MISC, 35 MMI_TRACE_G8_MEDIA, 36 MMI_TRACE_G9_EMAIL, 37 MMI_TRACE_G10_RESERVED, 38 MAX_MMI_TRACE_LOG_TYPE 39 } mmi_log_type_enum; 40 #endif /* __GNUC__ */ 41 #endif
插入新代码:
#define MMI_TRACE_FUNC TRACE_FUNC #define MMI_TRACE_STATE TRACE_STATE #define MMI_TRACE_INFO TRACE_INFO #define MMI_TRACE_WARNING TRACE_WARNING #define MMI_TRACE_ERROR TRACE_ERROR #define MMI_TRACE_G1_FRM TRACE_GROUP_1 #define MMI_TRACE_G2_GUI TRACE_GROUP_2 #define MMI_TRACE_G3_BOOTUP TRACE_GROUP_3 #define MMI_TRACE_G4_PHB TRACE_GROUP_4 #define MMI_TRACE_G5_CM TRACE_GROUP_5 #define MMI_TRACE_G6_SMS TRACE_GROUP_6 #define MMI_TRACE_G7_MISC TRACE_GROUP_7 #define MMI_TRACE_G8_MEDIA TRACE_GROUP_8 #define MMI_TRACE_G9_EMAIL TRACE_GROUP_9 #define MMI_TRACE_G10_RESERVED TRACE_GROUP_10 #define MAX_MMI_TRACE_LOG_TYPE (MMI_TRACE_G10_RESERVED+1)
3.make new
PS: GNU支持特性的特性如下:
- 可执行代码可以定义变量;
- 结构体初始化时可指定成员;
- 支持匿名union;
- ……
原文地址:http://www.noblock.cn/?p=156