我是c ++的新手,正在尝试在Platformio中编译简单的arduino项目。
platformio.ini文件:
[platformio]
src_dir = .
lib_extra_dirs = .piolibdeps/, ../../
[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino
lib_deps =
# PubSubClient
painlessMesh
main.ino文件:
#include <Arduino.h>
#include <painlessMesh.h>
void setup()
{
}
void loop()
{
}
应该很简单,但我遇到下一个错误:
'ArduinoJson6100_100 :: DynamicJsonDocument'没有名为的成员 'nestingLimit'
完整的编译器堆栈:
在文件夹test4中执行任务:platformio运行<< / p>
处理nodemcuv2(平台:espressif8266;开发板:nodemcuv2; 框架:arduino) -------------------------------------------------- -------------------------------------------------- --------详细模式可以通过
-v, --verbose
选项CONFIGURATION启用: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html 平台:乐鑫8266> NodeMCU 1.0(ESP-12E模块)硬件: ESP8266 80MHz 80KB RAM(4MB Flash)转换main.ino库 依赖查找器-> LDF模式: 查找器(链)兼容性(软)收集了35个兼容库 扫描依赖项...依赖关系图|-1.3.0 |
|-6.10.0 | |-3.0.2 | |- 1.2.0 | | |-1.0 | |- 1.0编译.pioenvs / nodemcuv2 / src / main.ino.cpp.o 生成LD脚本 .pioenvs / nodemcuv2 / ld / local.eagle.app.v6.common.ld存档 .pioenvs / nodemcuv2 / libef5 / libArduinoJson_ID64.a存档 .pioenvs / nodemcuv2 / libca3 / libTaskScheduler_ID721.a索引 .pioenvs / nodemcuv2 / libef5 / libArduinoJson_ID64.a索引 .pioenvs / nodemcuv2 / libca3 / libTaskScheduler_ID721.a编译 .pioenvs / nodemcuv2 / lib6c2 / ESP8266WiFi / BearSSLHelpers.cpp.o编译 .pioenvs / nodemcuv2 / lib6c2 / ESP8266WiFi / CertStoreBearSSL.cpp.o编译 .pioenvs / nodemcuv2 / lib6c2 / ESP8266WiFi / ESP8266WiFi.cpp.o编译 .pioenvs / nodemcuv2 / lib6c2 / ESP8266WiFi / ESP8266WiFiAP.cpp.o编译 .pioenvs / nodemcuv2 / lib6c2 / ESP8266WiFi / ESP8266WiFiGeneric.cpp.o 编译.pioenvs / nodemcuv2 / lib6c2 / ESP8266WiFi / ESP8266WiFiMulti.cpp.o 编译中 .pioenvs / nodemcuv2 / lib6c2 / ESP8266WiFi / ESP8266WiFiSTA-WPS.cpp.o 编译.pioenvs / nodemcuv2 / lib6c2 / ESP8266WiFi / ESP8266WiFiSTA.cpp.o 编译.pioenvs / nodemcuv2 / lib6c2 / ESP8266WiFi / ESP8266WiFiScan.cpp.o 编译.pioenvs / nodemcuv2 / lib6c2 / ESP8266WiFi / WiFiClient.cpp.o 编译中 .pioenvs / nodemcuv2 / lib6c2 / ESP8266WiFi / WiFiClientSecureAxTLS.cpp.o 编译中 .pioenvs / nodemcuv2 / lib6c2 / ESP8266WiFi / WiFiClientSecureBearSSL.cpp.o 编译.pioenvs / nodemcuv2 / lib6c2 / ESP8266WiFi / WiFiServer.cpp.o 编译中 .pioenvs / nodemcuv2 / lib6c2 / ESP8266WiFi / WiFiServerSecureAxTLS.cpp.o 编译中 .pioenvs / nodemcuv2 / lib6c2 / ESP8266WiFi / WiFiServerSecureBearSSL.cpp.o 编译.pioenvs / nodemcuv2 / lib6c2 / ESP8266WiFi / WiFiUdp.cpp.o 编译中 .pioenvs / nodemcuv2 / lib129 / ESPAsyncTCP_ID305 / AsyncPrinter.cpp.o 编译中 .pioenvs / nodemcuv2 / lib129 / ESPAsyncTCP_ID305 / ESPAsyncTCP.cpp.o 编译中 .pioenvs / nodemcuv2 / lib129 / ESPAsyncTCP_ID305 / ESPAsyncTCPbuffer.cpp.o 存档.pioenvs / nodemcuv2 / lib6c2 / libESP8266WiFi.a索引 .pioenvs / nodemcuv2 / lib6c2 / libESP8266WiFi.a编译 .pioenvs / nodemcuv2 / lib129 / ESPAsyncTCP_ID305 / SyncClient.cpp.o编译 .pioenvs / nodemcuv2 / lib129 / ESPAsyncTCP_ID305 / tcp_axtls.c.o编译 .pioenvs / nodemcuv2 / lib3f1 / painlessMesh_ID1269 / TaskScheduler.cpp.o 编译中 .pioenvs / nodemcuv2 / lib3f1 / painlessMesh_ID1269 / painlessMesh.cpp.o 编译中 .pioenvs / nodemcuv2 / lib3f1 / painlessMesh_ID1269 / painlessMeshAP.cpp.o 存档.pioenvs / nodemcuv2 / lib129 / libESPAsyncTCP_ID305.a索引 .pioenvs / nodemcuv2 / lib129 / libESPAsyncTCP_ID305.a编译 .pioenvs / nodemcuv2 / lib3f1 / painlessMesh_ID1269 / painlessMeshComm.cpp.o 编译中 .pioenvs / nodemcuv2 / lib3f1 / painlessMesh_ID1269 / painlessMeshConnection.cpp.o 编译中 .pioenvs / nodemcuv2 / lib3f1 / painlessMesh_ID1269 / painlessMeshDebug.cpp.o 编译中 .pioenvs / nodemcuv2 / lib3f1 / painlessMesh_ID1269 / painlessMeshJson.cpp.o .piolibdeps / painlessMesh_ID1269 / src / painlessMeshComm.cpp:在成员中 函数'String painlessMesh :: buildMeshPackage(uint32_t,uint32_t, meshPackageType,String&)': .piolibdeps / painlessMesh_ID1269 / src / painlessMeshComm.cpp:68:25:错误: 没有匹配的函数来调用 'ArduinoJson6100_100 :: BasicJsonDocument :: BasicJsonDocument()' DynamicJsonDocument jsonBuffer; ^ .piolibdeps / painlessMesh_ID1269 / src / painlessMeshComm.cpp:68:25:注意: 候选对象是:包含在以下文件中 .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / DynamicJsonDocument.hpp:7:0, 来自.piolibdeps / ArduinoJson_ID64 / src / ArduinoJson.hpp:21,来自 .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson.h:9,来自 .piolibdeps / painlessMesh_ID1269 / src / painlessMesh.h:12,来自 .piolibdeps / painlessMesh_ID1269 / src / painlessMeshComm.cpp:8: .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / BasicJsonDocument.hpp:50:3: 注意: ArduinoJson6100_100 :: BasicJsonDocument :: BasicJsonDocument(ArduinoJson6100_100 :: VariantRef) [使用TAllocator = ArduinoJson6100_100 :: DefaultAllocator] BasicJsonDocument(VariantRef src)^ .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / BasicJsonDocument.hpp:50:3: 注意:考生需要1个参数,提供0个 .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / BasicJsonDocument.hpp:43:3: 注意:模板 ArduinoJson6100_100 :: BasicJsonDocument :: BasicJsonDocument(const T&,类型名称 ArduinoJson6100_100 :: enable_if :: value> :: type *) BasicJsonDocument(const T&src,^ .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / BasicJsonDocument.hpp:43:3: 注意:模板参数推导/替换失败: .piolibdeps / painlessMesh_ID1269 / src / painlessMeshComm.cpp:68:25:注意: 候选人期望有2个参数,提供了0个DynamicJsonDocument jsonBuffer; ^在文件中包含 .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / DynamicJsonDocument.hpp:7:0, 来自.piolibdeps / ArduinoJson_ID64 / src / ArduinoJson.hpp:21,来自 .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson.h:9,来自 .piolibdeps / painlessMesh_ID1269 / src / painlessMesh.h:12,来自 .piolibdeps / painlessMesh_ID1269 / src / painlessMeshComm.cpp:8: .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / BasicJsonDocument.hpp:36:3: 注意: ArduinoJson6100_100 :: BasicJsonDocument :: BasicJsonDocument(const ArduinoJson6100_100 :: BasicJsonDocument&)[与TAllocator = ArduinoJson6100_100 :: DefaultAllocator] BasicJsonDocument(const BasicJsonDocument&src)^ .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / BasicJsonDocument.hpp:36:3: 注意:考生需要1个参数,提供0个 .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / BasicJsonDocument.hpp:33:12: 注意: ArduinoJson6100_100 :: BasicJsonDocument :: BasicJsonDocument(size_t, TAllocator)[with TAllocator = ArduinoJson6100_100 :: DefaultAllocator; size_t = unsigned int]显式BasicJsonDocument(size_t capa, TAllocator分配器= TAllocator())^ .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / BasicJsonDocument.hpp:33:12: 注意:考生需要2个参数,提供0个 .piolibdeps / painlessMesh_ID1269 / src / painlessMeshConnection.cpp:在 成员函数'void MeshConnection :: handleMessage(String&, uint32_t)': .piolibdeps / painlessMesh_ID1269 / src / painlessMeshConnection.cpp:543:25: 错误:没有匹配的调用函数 'ArduinoJson6100_100 :: BasicJsonDocument :: BasicJsonDocument()' DynamicJsonDocument jsonBuffer; ^ .piolibdeps / painlessMesh_ID1269 / src / painlessMeshConnection.cpp:543:25: 注意:候选人是:在以下文件中包含 .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / DynamicJsonDocument.hpp:7:0, 来自.piolibdeps / ArduinoJson_ID64 / src / ArduinoJson.hpp:21,来自 .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson.h:9,来自 .piolibdeps / painlessMesh_ID1269 / src / painlessMesh.h:12,来自 .piolibdeps / painlessMesh_ID1269 / src / painlessMeshConnection.cpp:9: .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / BasicJsonDocument.hpp:50:3: 注意: ArduinoJson6100_100 :: BasicJsonDocument :: BasicJsonDocument(ArduinoJson6100_100 :: VariantRef) [使用TAllocator = ArduinoJson6100_100 :: DefaultAllocator] BasicJsonDocument(VariantRef src)^ .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / BasicJsonDocument.hpp:50:3: 注意:考生需要1个参数,提供0个 .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / BasicJsonDocument.hpp:43:3: 注意:模板 ArduinoJson6100_100 :: BasicJsonDocument :: BasicJsonDocument(const T&,类型名称 ArduinoJson6100_100 :: enable_if :: value> :: type *) BasicJsonDocument(const T&src,^ .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / BasicJsonDocument.hpp:43:3: 注意:模板参数推导/替换失败: .piolibdeps / painlessMesh_ID1269 / src / painlessMeshConnection.cpp:543:25: 注意:候选人需要2个参数,其中0个参数是DynamicJsonDocument jsonBuffer; ^在文件中包含 .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / DynamicJsonDocument.hpp:7:0, 来自.piolibdeps / ArduinoJson_ID64 / src / ArduinoJson.hpp:21,来自 .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson.h:9,来自 .piolibdeps / painlessMesh_ID1269 / src / painlessMesh.h:12,来自 .piolibdeps / painlessMesh_ID1269 / src / painlessMeshConnection.cpp:9: .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / BasicJsonDocument.hpp:36:3: 注意: ArduinoJson6100_100 :: BasicJsonDocument :: BasicJsonDocument(const ArduinoJson6100_100 :: BasicJsonDocument&)[与TAllocator = ArduinoJson6100_100 :: DefaultAllocator] BasicJsonDocument(const BasicJsonDocument&src)^ .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / BasicJsonDocument.hpp:36:3: 注意:考生需要1个参数,提供0个 .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / BasicJsonDocument.hpp:33:12: 注意: ArduinoJson6100_100 :: BasicJsonDocument :: BasicJsonDocument(size_t, TAllocator)[with TAllocator = ArduinoJson6100_100 :: DefaultAllocator; size_t = unsigned int]显式BasicJsonDocument(size_t capa, TAllocator分配器= TAllocator())^ .piolibdeps / ArduinoJson_ID64 / src / ArduinoJson / Document / BasicJsonDocument.hpp:33:12: 注意:考生需要2个参数,提供0个 .piolibdeps / painlessMesh_ID1269 / src / painlessMeshConnection.cpp:544:16: 错误:“ ArduinoJson6100_100 :: DynamicJsonDocument”没有名为的成员 'nestingLimit'jsonBuffer.nestingLimit = 255; ^ * [.pioenvs / nodemcuv2 / lib3f1 / painlessMesh_ID1269 / painlessMeshComm.cpp.o] 错误1 * [.pioenvs / nodemcuv2 / lib3f1 / painlessMesh_ID1269 / painlessMeshConnection.cpp.o] 错误1 ======================================= [错误]花费了10.54秒==== ===================================终端进程终止于退出代码:1
我在做什么错了?
谢谢!
答案 0 :(得分:0)
在库源文件中已解决:https://gitlab.com/painlessMesh/painlessMesh/issues/253
作者评论:
感谢您的举报。应该在最新版本中修复 (1.3.1)。让我知道您是否还有问题