楼主呀!新人表示到这边出错
Arduino:1.6.9 (Windows 7), 开发板:"Arduino Nano, ATmega328"
C:\Users\daosheng\Documents\Arduino\sketch_may17a\sketch_may17a.ino:21:43: warning: integer overflow in expression [-Woverflow]
const unsigned long postingInterval = 200*1000;
^
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::reset()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::write_bit(unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::read_bit()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::write(unsigned char, unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::write_bytes(unsigned char const*, unsigned int, bool)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::read()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::read_bytes(unsigned char*, unsigned int)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::select(unsigned char*)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::skip()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::depower()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::reset_search()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::OneWire(unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::OneWire(unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::search(unsigned char*)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::crc8(unsigned char*, unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::crc16(unsigned char*, unsigned int)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::check_crc16(unsigned char*, unsigned int, unsigned char*)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::reset()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::write_bit(unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::read_bit()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::write(unsigned char, unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::write_bytes(unsigned char const*, unsigned int, bool)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::read()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::read_bytes(unsigned char*, unsigned int)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::select(unsigned char*)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::skip()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::depower()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::reset_search()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::OneWire(unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::OneWire(unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::search(unsigned char*)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::crc8(unsigned char*, unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::crc16(unsigned char*, unsigned int)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::check_crc16(unsigned char*, unsigned int, unsigned char*)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
为开发板 Arduino Nano 编译时出错。
在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。
Arduino:1.6.9 (Windows 7), 开发板:"Arduino Nano, ATmega328"
C:\Users\daosheng\Documents\Arduino\sketch_may17a\sketch_may17a.ino:21:43: warning: integer overflow in expression [-Woverflow]
const unsigned long postingInterval = 200*1000;
^
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::reset()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::write_bit(unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::read_bit()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::write(unsigned char, unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::write_bytes(unsigned char const*, unsigned int, bool)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::read()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::read_bytes(unsigned char*, unsigned int)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::select(unsigned char*)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::skip()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::depower()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::reset_search()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::OneWire(unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::OneWire(unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::search(unsigned char*)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::crc8(unsigned char*, unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::crc16(unsigned char*, unsigned int)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
sketch\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
sketch\OneWire/OneWire.cpp:120: multiple definition of `OneWire::check_crc16(unsigned char*, unsigned int, unsigned char*)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::reset()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::write_bit(unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::read_bit()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::write(unsigned char, unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::write_bytes(unsigned char const*, unsigned int, bool)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::read()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::read_bytes(unsigned char*, unsigned int)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::select(unsigned char*)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::skip()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::depower()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::reset_search()'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::OneWire(unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::OneWire(unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::search(unsigned char*)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::crc8(unsigned char*, unsigned char)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::crc16(unsigned char*, unsigned int)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
libraries\OneWire\OneWire.cpp.o: In function `OneWire::reset()':
C:\Users\daosheng\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::check_crc16(unsigned char*, unsigned int, unsigned char*)'
sketch\OneWire.cpp.o:sketch/OneWire.cpp:120: first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
为开发板 Arduino Nano 编译时出错。
在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。
|