ljg-net 发表于 2014-4-23 11:31:55

库文件 大讨论 库文件导入已有的库文件

库文件 大讨论 库文件导入已有的库文件

问题1、有几处需要导入已有的库文件。
      A、头文件中需要吗?#include <IRremote.h> 我理解需要,因为如果使用arduino的库文件就需要#include "Arduino.h"。
b、源文件需要吗?#include <IRremote.h>我理解需要也是看到#include "Arduino.h"。
c、ide程序中需要导入#include <IRremote.h>。我理解需要。


问题2、源文件中IRrecv irrecv(RECV_PIN);定义对象,需要在头文件的私有变量中声明吗?

问题3、源文件中decode_results results;中的results也是变量,需要在头文件的私有变量中声明吗,怎么声明?

这是编译时提示的问题,irrecv没有这个类。
KeyesIRremote::codeRead()':
E:\arduino-1.5.4\libraries\KeyesIRremote\KeyesIRremote.cpp:17: error: '((KeyesIRremote*)this)->KeyesIRremote::irrecv' does not have class type
E:\arduino-1.5.4\libraries\KeyesIRremote\KeyesIRremote.cpp:20: error: '((KeyesIRremote*)this)->KeyesIRremote::irrecv' does not have class type


页: [1]
查看完整版本: 库文件 大讨论 库文件导入已有的库文件