aliosthings 下载sdk,直接编译mqttapp报错
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
#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 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之后并没有什么用。 不知道为什么呢
赞0
踩0