gpt4 book ai didi

android - 3.4源码编译错误: fields must have a constant size: 'variable length array in structure' extension will never be supported on android 2.

转载 作者:行者123 更新时间:2023-11-30 17:46:10 24 4
gpt4 key购买 nike

您好,我在 android 2.3.4 源代码中尝试 make libdvm 时遇到以下错误,

external/elfutils/libebl/eblobjnote.c:43:17: error: fields must have a constant size: 'variable length array in structure' extension will never be supported
uint32_t version[descsz / 4 - 1];

这是 gcc 4.2 在我的 mac os x mountain lion 上报告的真正的 c 错误。我猜想 gcc 4.2 和 android 2.3.4 源代码有一些不兼容。我必须改变一些东西才能使编译达到这一点。我不知道使用哪个 gcc 版本来编译代码,但 gcc 4.2 经常在代码中发现错误。

谁能告诉我如何处理这些错误,或者在最坏的情况下我应该使用哪个 gcc 版本以及如何在 mac os x 中降级到该特定版本?

最佳答案

嗯,我解决了这个问题。实际上,CC 与 clang 相关,而不是 gcc,而 clang 的限制性更强。我使用 gcc 而不是 clang 并解决了问题。虽然存在一些其他编译错误,并且我相信该项目是使用 4 之前的 gcc 编译的,因为我发现的错误是由 gcc 报告的。

关于android - 3.4源码编译错误: fields must have a constant size: 'variable length array in structure' extension will never be supported on android 2.,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19416608/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com