极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 17556|回复: 3

遇到这样问题sketch_mar19a.cpp:1:27: error: NewSoftrial.h: No such file or dire

[复制链接]
发表于 2012-3-19 21:31:01 | 显示全部楼层 |阅读模式
本帖最后由 txmg 于 2012-3-20 21:44 编辑

好吧!新手!
我在使用代码时!出现这样错误!
  1. sketch_mar19a.cpp:1:27: error: NewSoftSerial.h: No such file or directory
  2. sketch_mar19a:5: error: 'NewSoftSerial' does not name a type
  3. sketch_mar19a.cpp: In function 'void setup()':
  4. sketch_mar19a:14: error: 'RFID' was not declared in this scope
  5. sketch_mar19a.cpp: In function 'void loop()':
  6. sketch_mar19a:22: error: 'RFID' was not declared in this scope
  7. sketch_mar19a.cpp: In function 'void add()':
  8. sketch_mar19a:40: error: 'RFID' was not declared in this scope
  9. sketch_mar19a.cpp: In function 'void del()':
  10. sketch_mar19a:66: error: 'RFID' was not declared in this scope
复制代码
理解应该是缺少NewSoftSerial.h: No such file or directory文件把??
该怎么解决??
谢谢!!
回复

使用道具 举报

发表于 2012-3-19 22:35:53 | 显示全部楼层
以0022的IDE为例,你需要把库文件夹放入arduino-0022\libraries\中,库文件夹下要直接放入库文件与examples文件夹,不可以出现itg3200\itg3200\这两两层的目录结构(这种容易在解压缩中出现),双层结构会导致库不识别。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-3-19 22:49:46 | 显示全部楼层
  1. In file included from FY1Z49MGH89ZZ95.cpp:1:
  2. D:\arduino-1.0\libraries\NewSoftSerial/NewSoftSerial.h:33:2: error: #error NewSoftSerial has been moved into the Arduino core as of version 1.0. Use SoftwareSerial instead.
  3. In file included from FY1Z49MGH89ZZ95.cpp:1:
  4. D:\arduino-1.0\libraries\NewSoftSerial/NewSoftSerial.h:99: error: conflicting return type specified for 'virtual void NewSoftSerial::write(uint8_t)'
  5. D:\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error:   overriding 'virtual size_t Print::write(uint8_t)'
复制代码
嗯@刚google到!添加了库文件!
google翻译了下!貌似NewSoftSerial被替换了SoftwareSerial
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-3-20 21:44:11 | 显示全部楼层
弘毅 发表于 2012-3-19 22:35
以0022的IDE为例,你需要把库文件夹放入arduino-0022\libraries\中,库文件夹下要直接放入库文件与examples ...

嗯!解决了!thx
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 需要先绑定手机号

Archiver|联系我们|极客工坊

GMT+8, 2024-4-29 08:14 , Processed in 0.043583 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2021, Tencent Cloud.

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