开发者社区> 问答> 正文

aliosthings 下载sdk,直接编译mqttapp报错

下载的alios sdk,直接编译mqttapp时infra_types.h直接报错cconflicting types for ‘uint32_t’,但是看不出来哪里冲突了

展开
收起
liuyunyin 2020-04-30 22:04:08 832 0
1 条回答
写回答
取消 提交回答
  • 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之后并没有什么用。 不知道为什么呢

    2020-05-01 10:30:51
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
从 SDK 到编解码:视频直播架构解析 立即下载
跨平台的云服务SDK需要什么 立即下载
一个跨平台的云服务SDK需要什么 立即下载