Is it possible to include a library from another library using the Arduino IDE?(是否可以使用 Arduino IDE 包含来自另一个库的库?)
问题描述
I'm trying to write an Arduino library (effectively a C++ class) which itself references another library I have installed in my Mac's ~/Documents/Arduino/libraries directory.
At the top of the .cpp of the library I'm writing, I've tried
#include <ReferencedLibrary.h>
and
#include "ReferencedLibrary.h"
... neither of which work. I can successfully #include <ReferencedLibrary.h>
from sketches in my ~/Documents/Arduino directory. Am I missing something or is this a limitation of the Arduino IDE/makefile? Is there a workaround?
This issue was solved in the Arduino 1.6.6 release. The release notes of 1.6.6 mention that library to library dependencies have been fixed.
Library to library dependencies: when your sketch imports a library, and that library uses another, the IDE will find out without you having to add a useless #include to your sketch
Updating your version to 1.6.6 or newer will resolve your problem.
这篇关于是否可以使用 Arduino IDE 包含来自另一个库的库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:是否可以使用 Arduino IDE 包含来自另一个库的库?


基础教程推荐
- C利用语言实现数据结构之队列 2022-11-22
- 如何C++使用模板特化功能 2023-03-05
- C/C++编程中const的使用详解 2023-03-26
- C++中的atoi 函数简介 2023-01-05
- C语言基础全局变量与局部变量教程详解 2022-12-31
- 详解c# Emit技术 2023-03-25
- C语言 structural body结构体详解用法 2022-12-06
- C++详细实现完整图书管理功能 2023-04-04
- 一文带你了解C++中的字符替换方法 2023-07-20
- C++使用easyX库实现三星环绕效果流程详解 2023-06-26