这个编译错误怎么解决,大家进来看看-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 4286|回复: 2

[过期] 这个编译错误怎么解决,大家进来看看

[复制链接]
发表于 2014-7-12 16:26 | 显示全部楼层 |阅读模式
打算做自制火箭的三轴陀螺仪自动开伞,用的MPU6050芯片。文件都找完了的,上图:
QQ截图20140712161210.jpg



换了个高版本的软件,结果:
QQ截图20140712161843.jpg



下面错误提示的Sd2Card.cpp是软件自己库里面有的,结果弹出来错误。这个问题该怎么解决呢?谢谢各位。


再把错误复制一道:
Arduino:1.5.5-r2 (Windows 7), 板:"Arduino Nano, ATmega168"


Using library Wire in folder: D:\Arduino\hardware\arduino\avr\libraries\Wire (pre-1.5)


Using library MPU6050 in folder: D:\Arduino\libraries\MPU6050 (pre-1.5)


Using library SD in folder: D:\Arduino\libraries\SD






D:\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=155 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -ID:\Arduino\hardware\arduino\avr\cores\arduino -ID:\Arduino\hardware\arduino\avr\variants\eightanaloginputs -ID:\Arduino\hardware\arduino\avr\libraries\Wire -ID:\Arduino\libraries\MPU6050 -ID:\Arduino\libraries\SD\src C:\Users\Jesse\AppData\Local\Temp\build1334117913467652078.tmp\sketch_jul12a.cpp -o C:\Users\Jesse\AppData\Local\Temp\build1334117913467652078.tmp\sketch_jul12a.cpp.o


D:\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=155 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -ID:\Arduino\hardware\arduino\avr\cores\arduino -ID:\Arduino\hardware\arduino\avr\variants\eightanaloginputs -ID:\Arduino\hardware\arduino\avr\libraries\Wire -ID:\Arduino\libraries\MPU6050 -ID:\Arduino\libraries\SD\src -ID:\Arduino\hardware\arduino\avr\libraries\Wire\utility D:\Arduino\hardware\arduino\avr\libraries\Wire\Wire.cpp -o C:\Users\Jesse\AppData\Local\Temp\build1334117913467652078.tmp\Wire\Wire.cpp.o


D:\Arduino\hardware\tools\avr\bin\avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=155 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -ID:\Arduino\hardware\arduino\avr\cores\arduino -ID:\Arduino\hardware\arduino\avr\variants\eightanaloginputs -ID:\Arduino\hardware\arduino\avr\libraries\Wire -ID:\Arduino\libraries\MPU6050 -ID:\Arduino\libraries\SD\src -ID:\Arduino\hardware\arduino\avr\libraries\Wire\utility D:\Arduino\hardware\arduino\avr\libraries\Wire\utility\twi.c -o C:\Users\Jesse\AppData\Local\Temp\build1334117913467652078.tmp\Wire\utility\twi.c.o


D:\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=155 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -ID:\Arduino\hardware\arduino\avr\cores\arduino -ID:\Arduino\hardware\arduino\avr\variants\eightanaloginputs -ID:\Arduino\hardware\arduino\avr\libraries\Wire -ID:\Arduino\libraries\MPU6050 -ID:\Arduino\libraries\SD\src -ID:\Arduino\libraries\MPU6050\utility D:\Arduino\libraries\MPU6050\MPU6050.cpp -o C:\Users\Jesse\AppData\Local\Temp\build1334117913467652078.tmp\MPU6050\MPU6050.cpp.o


D:\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=155 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -ID:\Arduino\hardware\arduino\avr\cores\arduino -ID:\Arduino\hardware\arduino\avr\variants\eightanaloginputs -ID:\Arduino\hardware\arduino\avr\libraries\Wire -ID:\Arduino\libraries\MPU6050 -ID:\Arduino\libraries\SD\src D:\Arduino\libraries\SD\src\File.cpp -o C:\Users\Jesse\AppData\Local\Temp\build1334117913467652078.tmp\src\File.cpp.o


D:\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=155 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -ID:\Arduino\hardware\arduino\avr\cores\arduino -ID:\Arduino\hardware\arduino\avr\variants\eightanaloginputs -ID:\Arduino\hardware\arduino\avr\libraries\Wire -ID:\Arduino\libraries\MPU6050 -ID:\Arduino\libraries\SD\src D:\Arduino\libraries\SD\src\SD.cpp -o C:\Users\Jesse\AppData\Local\Temp\build1334117913467652078.tmp\src\SD.cpp.o


D:\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=155 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -ID:\Arduino\hardware\arduino\avr\cores\arduino -ID:\Arduino\hardware\arduino\avr\variants\eightanaloginputs -ID:\Arduino\hardware\arduino\avr\libraries\Wire -ID:\Arduino\libraries\MPU6050 -ID:\Arduino\libraries\SD\src D:\Arduino\libraries\SD\src\utility\Sd2Card.cpp -o C:\Users\Jesse\AppData\Local\Temp\build1334117913467652078.tmp\src\utility\Sd2Card.cpp.o


D:\Arduino\libraries\SD\src\utility\Sd2Card.cpp: In function 'void spiSend(uint8_t)':
D:\Arduino\libraries\SD\src\utility\Sd2Card.cpp:35: error: 'SPI' was not declared in this scope
D:\Arduino\libraries\SD\src\utility\Sd2Card.cpp: In function 'uint8_t spiRec()':
D:\Arduino\libraries\SD\src\utility\Sd2Card.cpp:44: error: 'SPI' was not declared in this scope
D:\Arduino\libraries\SD\src\utility\Sd2Card.cpp: In member function 'uint8_t Sd2Card::init(uint8_t, uint8_t)':
D:\Arduino\libraries\SD\src\utility\Sd2Card.cpp:251: error: 'SPI' was not declared in this scope
D:\Arduino\libraries\SD\src\utility\Sd2Card.cpp: In member function 'uint8_t Sd2Card::setSckRate(uint8_t)':
D:\Arduino\libraries\SD\src\utility\Sd2Card.cpp:507: error: 'SPI' was not declared in this scope


发表于 2014-7-12 23:05 | 显示全部楼层
include spi.h 没?
 楼主| 发表于 2014-7-13 23:41 | 显示全部楼层
错误代码好像不是这个意思啊~~
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-12-5 10:37 , Processed in 0.082273 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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