打印
[其它]

为开发板Arduino/Genuino Mega orMega 2560编译时出错

[复制链接]
7354|3
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
JJyongqi|  楼主 | 2019-4-18 14:47 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
为开发板Arduino/Genuino Mega orMega 2560编译时出错
求解决
Arduino:1.8.8 (Windows 10), 开发板:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

libraries\BEEP\BEEP.cpp.o (symbol from plugin): In function `_BEEP::_BEEP()':

(.text+0x0): multiple definition of `_BEEP::_BEEP()'

sketch\BEEP.cpp.o (symbol from plugin):(.text+0x0): first defined here

d:/arduino/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

libraries\BEEP\BEEP.cpp.o (symbol from plugin): In function `_BEEP::_BEEP()':

(.text+0x0): multiple definition of `_BEEP::_BEEP()'

sketch\BEEP.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BEEP\BEEP.cpp.o (symbol from plugin): In function `_BEEP::_BEEP()':

(.text+0x0): multiple definition of `_BEEP::~_BEEP()'

sketch\BEEP.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BEEP\BEEP.cpp.o (symbol from plugin): In function `_BEEP::_BEEP()':

(.text+0x0): multiple definition of `_BEEP::~_BEEP()'

sketch\BEEP.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BEEP\BEEP.cpp.o (symbol from plugin): In function `_BEEP::_BEEP()':

(.text+0x0): multiple definition of `_BEEP::TurnOn()'

sketch\BEEP.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BEEP\BEEP.cpp.o (symbol from plugin): In function `_BEEP::_BEEP()':

(.text+0x0): multiple definition of `_BEEP::TurnOff()'

sketch\BEEP.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BEEP\BEEP.cpp.o (symbol from plugin): In function `_BEEP::_BEEP()':

(.text+0x0): multiple definition of `_BEEP::Initialization()'

sketch\BEEP.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\BEEP\BEEP.cpp.o (symbol from plugin): In function `_BEEP::_BEEP()':

(.text+0x0): multiple definition of `BEEP'

sketch\BEEP.cpp.o (symbol from plugin):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1
为开发板 Arduino/Genuino Mega or Mega 2560 编译时出错。

在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。

使用特权

评论回复

相关帖子

沙发
dirtwillfly| | 2019-4-22 22:53 | 只看该作者
从错误信息看是出现了多重定义,方便的话建议楼主上传下代码

使用特权

评论回复
板凳
dirtwillfly| | 2019-4-22 22:59 | 只看该作者

使用特权

评论回复
地板
elongshi| | 2023-10-26 17:09 | 只看该作者
TurnOn(),_BEEP()这些函数你没写吧,直接引用提示函数未定义。如果是直接引用已有库函数,defined引用部分没搞好。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

2

主题

2

帖子

0

粉丝