【Linux】【Debug】编译错误error: two or more data types in declaration specifiers

在项目开发时,遇到编译出错,看提示是重复的定义,错误信息如下:

In file included from ./include/wrn/wm/common/wm.h:176,

                 from ./include/wrn/wm/http/httpLib.h:55,
                 from ./include/wrn/wm/common/wmAuth.h:17,
                 from src/common/wmAuth.c:49:
./include/wrn/wm/common/wmData.h:241: error: two or more data types in declaration specifiers
./include/wrn/wm/common/wmData.h:241: warning: useless type name in empty declaration
./include/wrn/wm/common/wmData.h:242: error: two or more data types in declaration specifiers
./include/wrn/wm/common/wmData.h:242: warning: useless type name in empty declaration
src/common/wmAuth.c: In function 'wm_string_getCode':
src/common/wmAuth.c:816: warning: comparison between pointer and integer
src/common/wmAuth.c: In function 'wmAuthSetNewCookie':
src/common/wmAuth.c:2323: warning: passing argument 2 of 'wmAUTHGetClientCookie' from incompatible pointer type
src/common/wmAuth.c:2324: warning: passing argument 3 of 'httpMimeOutCookieSet' from incompatible pointer type
make[1]: *** [src/common/wmAuth.o] Error 1

make: *** [webserver_build] Error 2


网上查看过,说是加分号,和其他头文件存在相同的定义,但是查找过,本地文件目录和交叉编译工具链中的头文件,都没有发现相同的定义:

./include/wm_options.h:typedef int sbyte4;
./include/wrn/wm/backplane/wmbLib.h:typedef int WMB_RID_T;
./include/wrn/wm/backplane/wmbLib.h:typedef int WMB_DOMAIN_T;
./include/wrn/wm/backplane/wmb.h:typedef int     WMB_HASH_HINT_T;
./include/wrn/wm/backplane/wmb.h:typedef int     WMB_ROLES_T;
./include/wrn/wm/backplane/wmb.h:typedef int     WMB_RESOURCE_ID_T;
./include/wrn/wm/backplane/wmb.h:typedef int     WMB_ARCHIVE_TYPE_T;
./include/wrn/wm/backplane/wmb.h:typedef int     WMB_CMD_T;
./include/wrn/wm/common/wmnet.h:typedef int                 OS_SOCKET_T;
./include/wrn/wm/common/wmnet.h:typedef int                 OS_SOCKET_T;
./include/wrn/wm/common/wmnet.h:typedef int                 OS_SOCKET_T;
./include/wrn/wm/common/wmnet.h:typedef int                 OS_SOCKET_T;
./include/wrn/wm/common/wmnet.h:typedef int                 OS_SOCKET_T;
./include/wrn/wm/common/wm.h:typedef int sbyte4;
./include/wrn/wm/common/wmos.h:typedef int     OS_THREAD_T;
./include/wrn/wm/common/wmos.h:typedef int     OS_SEM_T;
./include/wrn/wm/common/wmos.h:typedef int     OS_MSGQ_T;
./include/wrn/wm/common/wmos.h:typedef int     OS_PIPE_T;
./include/wrn/wm/common/wmos.h:typedef int     OS_TIME_T;
./include/wrn/wm/common/wmos.h:typedef int     SHARED_DATA_T;
./include/wrn/wm/common/wmos.h:typedef int             OS_SEM_T;
./include/wrn/wm/common/wmos.h:typedef int               OS_MSGQ_T;
./include/wrn/wm/common/wmos.h:typedef int               OS_PIPE_T;
./include/wrn/wm/common/wmos.h:typedef int             SHARED_DATA_T;
./include/wrn/wm/common/wmos.h:typedef int             OS_SEM_T;
./include/wrn/wm/common/wmos.h:typedef int             OS_MSGQ_T;
./include/wrn/wm/common/wmos.h:typedef int             OS_PIPE_T;
./include/wrn/wm/common/wmos.h:typedef int             SHARED_DATA_T;
./include/wrn/wm/common/wmos.h:typedef int             OS_MSGQ_T;
./include/wrn/wm/common/wmos.h:typedef int             OS_PIPE_T;
./include/wrn/wm/common/wmos.h:typedef int             SHARED_DATA_T;
./include/wrn/wm/common/wmos.h:typedef int             OS_ARG_T;
./include/wrn/wm/common/wmos.h:typedef int             OS_THREAD_T;
./include/wrn/wm/common/wmos.h:typedef int             OS_PIPE_T;
./include/wrn/wm/common/wmos.h:typedef int             OS_ARG_T;
./include/wrn/wm/common/wmos.h:typedef int             SHARED_DATA_T;
./include/wrn/wm/common/wmos.h:      typedef int OS_MSGQ_T;
./include/wrn/wm/common/wmos.h:typedef int SD_ID;
./include/wrn/wm/common/wmData.h:typedef int     CompareType;
./include/wrn/wm/common/wmData.h:typedef int     STATUS;
./include/wrn/wm/common/wmData.h:typedef int     BOOL;
./include/wrn/wm/common/zlib/vxWorks/zconf.h:typedef int   FAR intf;


查看提示错误的地方,是一个类型的定义:

typedef int     STATUS;;
typedef int     BOOL;;


修改成:

#ifndef STATUS
#define STATUS int
#endif
#ifndef BOOL
#define BOOL int
#endif



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值