txmg 发表于 2012-3-19 21:31:01

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

本帖最后由 txmg 于 2012-3-20 21:44 编辑

好吧!新手!
我在使用代码时!出现这样错误!sketch_mar19a.cpp:1:27: error: NewSoftSerial.h: No such file or directory
sketch_mar19a:5: error: 'NewSoftSerial' does not name a type
sketch_mar19a.cpp: In function 'void setup()':
sketch_mar19a:14: error: 'RFID' was not declared in this scope
sketch_mar19a.cpp: In function 'void loop()':
sketch_mar19a:22: error: 'RFID' was not declared in this scope
sketch_mar19a.cpp: In function 'void add()':
sketch_mar19a:40: error: 'RFID' was not declared in this scope
sketch_mar19a.cpp: In function 'void del()':
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\这两两层的目录结构(这种容易在解压缩中出现),双层结构会导致库不识别。

txmg 发表于 2012-3-19 22:49:46

In file included from FY1Z49MGH89ZZ95.cpp:1:
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.
In file included from FY1Z49MGH89ZZ95.cpp:1:
D:\arduino-1.0\libraries\NewSoftSerial/NewSoftSerial.h:99: error: conflicting return type specified for 'virtual void NewSoftSerial::write(uint8_t)'
D:\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error:   overriding 'virtual size_t Print::write(uint8_t)'
嗯@刚google到!添加了库文件!
google翻译了下!貌似NewSoftSerial被替换了SoftwareSerial

txmg 发表于 2012-3-20 21:44:11

弘毅 发表于 2012-3-19 22:35 static/image/common/back.gif
以0022的IDE为例,你需要把库文件夹放入arduino-0022\libraries\中,库文件夹下要直接放入库文件与examples ...

嗯!解决了!thx
页: [1]
查看完整版本: 遇到这样问题sketch_mar19a.cpp:1:27: error: NewSoftrial.h: No such file or dire