极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9118|回复: 0

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

[复制链接]
发表于 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


本帖子中包含更多资源

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

x
回复

使用道具 举报

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

本版积分规则

Archiver|联系我们|极客工坊

GMT+8, 2026-6-6 01:15 , Processed in 0.036905 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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