• Lv0
    粉丝0

积分12 / 贡献0

提问1答案被采纳0文章0

作者动态

    编译支持OH的flutter_engine时出现错误

    anlimin 来自手机 显示全部楼层 发表于 2023-11-18 11:04:21
    ../../third_party/dart/runtime/bin/socket_base_posix.cc:263:33: error: comparison of integers of different signs: 'unsigned long' and 'long' [-Werror,-Wsign-compare]
             i++, message++, cmsg = CMSG_NXTHDR(&msg, cmsg)) {
                                    ^~~~~~~~~~~~~~~~~~~~~~~
    /home/ubuntu/work/engine/ndk/linux/4.0/native/sysroot/usr/include/sys/socket.h:360:44: note: expanded from macro 'CMSG_NXTHDR'
            __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3 errors generated.
    [122/8624] CXX obj/flutter/third_party/tonic/file_loader/tonic.file_loader_posix.o
    ninja: build stopped: subcommand failed.

    您尚未登录,无法参与评论,登录后可以:
    参与开源共建问题交流
    认同或收藏高质量问答
    获取积分成为开源共建先驱

    精彩评论2

    westinyang

    沙发 发表于 2023-11-18 11:20:49

    忽略编译警告,重新编译,修改 engine/src/build/config/compiler/BUILD.gn

    # 搜索 default_warning_flags = 修改为下面的代码
    # line 602 603
    default_warning_flags = ["-Wno-sign-compare"]
    default_warning_flags_cc = ["-Wno-sign-compare"]

    Desto

    板凳 发表于 2023-11-18 11:31:56
    这个叫你去看socket_base_posix.cc的263行,unsigned long和long不能比较,你把两个改成同样类型试试

    Copyright   ©2023  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

    返回顶部