下载的alios sdk,直接编译mqttapp时infra_types.h直接报错cconflicting types for ‘uint32_t’,但是看不出来哪里冲突了
In file included from d:\alios-things\include\linkkit\dev_sign_api.h:4:0, from application/example/mqtt_demo/mqtt_example.c:10: d:\alios-things\include\linkkit\infra\infra_types.h:16:29: error: conflicting types for 'uint32_t' typedef unsigned int uint32_t; ^~~~~~~~ compilation terminated due to -Wfatal-errors.
infra_types.h中有一段定义:
#if !defined(PLATFORM_HAS_STDINT)
typedef unsigned char uint8_t; typedef signed char int8_t; typedef unsigned short uint16_t; typedef signed short int16_t; typedef unsigned int uint32_t; typedef signed int int32_t; typedef unsigned long int uint64_t; typedef signed long int int64_t; typedef unsigned int uintptr_t;
#else
#include <stdint.h>
#endif /* #if !defined(PLATFORM_HAS_STDINT) */
全局搜索了“PLATFORM_HAS_STDINT”,在components>linkkit>infra>config.in中,“PLATFORM_HAS_STDINT” default y, config PLATFORM_HAS_STDINT bool "PLATFORM_HAS_STDINT" default y help Tell if you have <stdint.h> when build image for target board
Switching to "n" leads to SDK use self-defined data-type in src/infra/infra_types.h
按照下面的说明,把y改成了n,应该编译不到了才对。但改成n之后并没有什么用。 不知道为什么呢
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。