常见编译报错汇总
关键字:
error:
make[
FAILED:
multiple definition
1. 摄像头兼容个数超过16个 - 增大为18个
alps\kernel-3.18\drivers\misc\mediatek\imgsensor\src\mt6735m\kd_sensorlist.h
#define MAX_NUM_OF_SUPPORT_SENSOR 16
ACDK_KD_SENSOR_INIT_FUNCTION_STRUCT kdSensorList[MAX_NUM_OF_SUPPORT_SENSOR]=
{
...
}
报错log:
excess elements in array initializer(给数组塞了超过初始化个数的元素)
In file included from alps/kernel-3.18/drivers/misc/mediatek/imgsensor/src/mt6735m/kd_sensorlist.c:39:0:
alps/kernel-3.18/drivers/misc/mediatek/imgsensor/src/mt6735m/kd_sensorlist.h:677:5: error: excess elements in array initializer [-Werror]
{T4KA3_SENSOR_ID, SENSOR_DRVNAME_T4KA3_MIPI_RAW, T4KA3_MIPI_RAW_SensorInit},
^
2. 安卓5.1 新增驱动需要在alps\kernel-3.10\drivers\misc\mediatek\Kconfig.drivers中建宏
3. makefile从安卓6.0移植到安卓5.1,需要修改
参照同一目录其他Makefile修改
4. 缺少头文件包含 - (安卓5.1)
fae提供的代码qma6981.c, 没有包含包含头文件accel.h, 导致编译移植报结构体struct sensor_init_info定义不一致
+ #include <accel.h>
报错log:
alps/kernel-3.10/drivers/misc/mediatek/accelerometer/qma6981/qma6981.c: In function 'qma6981_init':
alps/kernel-3.10/drivers/misc/mediatek/accelerometer/qma6981/qma6981.c:2091:2: error: implicit declaration of function 'acc_driver_add' [-Werror=implicit-function-declaration]
acc_driver_add(&qma6981_init_info);
^
5. 报错信息为转义字符 - 服务器加密问题 - 重启编译服务器
报错log:
Line 2780: ./build/core/combo/include/arch/linux-arm/AndroidConfig.h:1:1: error: stray '\24' in program
Line 2784: ./build/core/combo/include/arch/linux-arm/AndroidConfig.h:1:3: error: stray '#' in program
Line 2787: ./build/core/combo/inclu
22. 编译报错分析
最新推荐文章于 2024-01-18 20:10:20 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)