roverx 发表于 2011-7-13 13:05:04

'RTGUI_NAME_MAX' undeclared

加入rtgui组件时,出现编译错误:components/rtgui/include/rtgui/event.h:109:18: error: 'RTGUI_NAME_MAX' undeclared here (not in a function)

RTGUI_NAME_MAX在 rtgui_config.h中的定义如下

#ifdef _WIN32
        /* name length of RTGUI object */
        #define RTGUI_NAME_MAX                12
        ... ... ... ...
#else
        /* native running under RT-Thread */
        #ifndef RT_USING_DFS
                #undef RTGUI_USING_DFS_FILERW
                #undef RTGUI_USING_HZ_FILE
        #endif
#endif

是否 必须定义_WIN32?

roverx 发表于 2011-7-13 13:12:39

知道了,在rtconfig.h中定义:

/* name length of RTGUI object */
#define RTGUI_NAME_MAX                16
页: [1]
查看完整版本: 'RTGUI_NAME_MAX' undeclared