Arduino:1.8.13 (Windows 10)编译MultiWii1_8报错-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 11756|回复: 2

[已解决] Arduino:1.8.13 (Windows 10)编译MultiWii1_8报错

[复制链接]
发表于 2020-12-24 22:58 | 显示全部楼层 |阅读模式
本帖最后由 快高长大123 于 2021-1-9 12:03 编辑

电脑是Wind10 64位,装的Arduino为1.8.13版本,网上下载了“MultiWiiV1_8”文件,解压后再arduino打开,什么也没配置,直接编译报错如下:


F:\MultiWiiV1_8\MultiWii1_8\MultiWii1_8.pde: In function 'void loop()':
MultiWii1_8:412:13: error: 'Mag_getADC' was not declared in this scope
   if (MAG)  Mag_getADC();
             ^~~~~~~~~~
F:\MultiWiiV1_8\MultiWii1_8\MultiWii1_8.pde:412:13: note: suggested alternative: 'magADC'
   if (MAG)  Mag_getADC();
             ^~~~~~~~~~
             magADC
MultiWii1_8:413:13: error: 'Baro_update' was not declared in this scope
   if (BARO) Baro_update();
             ^~~~~~~~~~~
F:\MultiWiiV1_8\MultiWii1_8\EEPROM.pde: At global scope:
F:\MultiWiiV1_8\MultiWii1_8\EEPROM.pde:5:1: warning: 'typedef' was ignored in this declaration
typedef struct eep_entry_t{
^~~~~~~
F:\MultiWiiV1_8\MultiWii1_8\EEPROM.pde: In function 'void readEEPROM()':
F:\MultiWiiV1_8\MultiWii1_8\EEPROM.pde:37:57: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     eeprom_read_block(eep_entry.var, (void*)(_address), eep_entry.size); _address += eep_entry.size;
                                                         ^
F:\MultiWiiV1_8\MultiWii1_8\EEPROM.pde: In function 'void writeParams()':
F:\MultiWiiV1_8\MultiWii1_8\EEPROM.pde:48:58: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     eeprom_write_block(eep_entry.var, (void*)(_address), eep_entry.size); _address += eep_entry.size;
                                                          ^
F:\MultiWiiV1_8\MultiWii1_8\IMU.pde: In function 'void computeIMU()':
IMU:35:7: error: 'ACC_getADC' was not declared in this scope
       ACC_getADC();
       ^~~~~~~~~~
IMU:39:15: error: 'Gyro_getADC' was not declared in this scope
     if (GYRO) Gyro_getADC(); else WMP_getRawADC();
               ^~~~~~~~~~~
F:\MultiWiiV1_8\MultiWii1_8\IMU.pde:39:15: note: suggested alternative: 'gyroADC'
     if (GYRO) Gyro_getADC(); else WMP_getRawADC();
               ^~~~~~~~~~~
               gyroADC
IMU:45:15: error: 'Gyro_getADC' was not declared in this scope
     if (GYRO) Gyro_getADC(); else WMP_getRawADC();
               ^~~~~~~~~~~
F:\MultiWiiV1_8\MultiWii1_8\IMU.pde:45:15: note: suggested alternative: 'gyroADC'
     if (GYRO) Gyro_getADC(); else WMP_getRawADC();
               ^~~~~~~~~~~
               gyroADC
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde: At global scope:
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:9:1: warning: 'typedef' was ignored in this declaration
typedef struct lcd_type_desc_t{
^~~~~~~
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:19:1: warning: 'typedef' was ignored in this declaration
typedef struct lcd_param_def_t{
^~~~~~~
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:26:1: warning: 'typedef' was ignored in this declaration
typedef struct lcd_param_t{
^~~~~~~
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
};
^
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\LCD.pde:81:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
F:\MultiWiiV1_8\MultiWii1_8\Sensors.pde: In function 'void initSensors()':
Sensors:917:13: error: 'Gyro_init' was not declared in this scope
   if (GYRO) Gyro_init();
             ^~~~~~~~~
F:\MultiWiiV1_8\MultiWii1_8\Sensors.pde:917:13: note: suggested alternative: 'WMP_init'
   if (GYRO) Gyro_init();
             ^~~~~~~~~
             WMP_init
Sensors:919:13: error: 'Baro_init' was not declared in this scope
   if (BARO) Baro_init();
             ^~~~~~~~~
F:\MultiWiiV1_8\MultiWii1_8\Sensors.pde:919:13: note: suggested alternative: 'BaroAlt'
   if (BARO) Baro_init();
             ^~~~~~~~~
             BaroAlt
Sensors:920:12: error: 'ACC_init' was not declared in this scope
   if (ACC) ACC_init();
            ^~~~~~~~
F:\MultiWiiV1_8\MultiWii1_8\Sensors.pde:920:12: note: suggested alternative: 'WMP_init'
   if (ACC) ACC_init();
            ^~~~~~~~
            WMP_init
Sensors:921:12: error: 'Mag_init' was not declared in this scope
   if (MAG) Mag_init();
            ^~~~~~~~
F:\MultiWiiV1_8\MultiWii1_8\Sensors.pde:921:12: note: suggested alternative: 'WMP_init'
   if (MAG) Mag_init();
            ^~~~~~~~
            WMP_init
exit status 1
'Mag_getADC' was not declared in this scope

对这个IDE不熟,还请各位大神帮忙看下是什么问题,不胜感激。谢谢。
发表于 2020-12-27 14:22 | 显示全部楼层
可以用2.3的试一下,注意开启相关注释
 楼主| 发表于 2021-1-8 12:28 | 显示全部楼层
18192908029 发表于 2020-12-27 14:22
可以用2.3的试一下,注意开启相关注释

恩,换了2.4的然后开启相应注释后就编译就没问题了。估计1.8的也是没开启相应注释。谢谢
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-29 16:28 , Processed in 0.069132 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表