android - 如何解决与 clang 相关的 gcc 或 g++ 错误?
问题描述
在我的 android 内核中进行了一些更改,并试图编译它,但遇到了一些与 clang 相关的错误。
我试图操纵 clang 和 gcc 标志,但不知道应该添加或删除哪个。
extern "C"
{
int init_test()
{
int n=5,i;
TestClass **t;
t = new TestClass* [n];
for(i=0; i<n; i++) {
t[i] = new TestClass(i);
t[i]->print_version();
}
for(i=0; i<n; i++)
delete t[i];
delete t;
return 0;
}
输出:
CC kernel/test.o
real-aarch64-linux-android-g++: error: unrecognized command line option '-no-integrated-as'
real-aarch64-linux-android-g++: error: unrecognized command line option '-mno-implicit-float'
real-aarch64-linux-android-g++: error: unrecognized command line option '-mno-global-merge'
real-aarch64-linux-android-g++: error: unrecognized command line option '-no-integrated-as'
real-aarch64-linux-android-g++: error: unrecognized command line option '-Qunused-arguments'
make[3]: *** [/home/saurabh/walleye_test/private/msm-google/scripts/Makefile.build:333: kernel/test.o] Error 1
make[2]: *** [/home/saurabh/walleye_test/private/msm-google/Makefile:1100: kernel] Error 2
解决方案
推荐阅读
- parse-platform - 如何固定/取消固定 ParseObject 非递归?
- python - 加载视频的最佳方式 - VideoCapture vs Frames
- kotlin - 将 Jetbrains 暴露的库与 Ktor 一起使用并在协程内执行数据库事务是否安全?
- javascript - 表单验证 - 电子邮件、姓名和签名
- azure-language-understanding - 处理列表实体上的拼写错误
- python - 从子进程调用时无法将参数传递给python脚本
- php - 如何使用带有访问令牌的 php 将文件上传到谷歌驱动器
- html - 当我为移动设备调整页脚大小时,页脚和页面底部之间有一个空白区域
- database - 我的信息没有发送到我的数据库
- html - Safari 中的三角形按钮颜色问题(纯 CSS)