I'm new to c++, and trying to compile simple arduino project in the Platformio.
platformio.ini file:
[platformio]
src_dir = .
lib_extra_dirs = .piolibdeps/, ../../
[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino
lib_deps =
# PubSubClient
painlessMesh
main.ino file:
#include <Arduino.h>
#include <painlessMesh.h>
void setup()
{
}
void loop()
{
}
Should be something simple, but I'm getting next error:
'ArduinoJson6100_100::DynamicJsonDocument' has no member named 'nestingLimit'
Full compiler stack:
Executing task in folder test4: platformio run <
Processing nodemcuv2 (platform: espressif8266; board: nodemcuv2; framework: arduino) ------------------------------------------------------------------------------------------------------------ Verbose mode can be enabled via
-v, --verbose
option CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html PLATFORM: Espressif 8266 > NodeMCU 1.0 (ESP-12E Module) HARDWARE: ESP8266 80MHz 80KB RAM (4MB Flash) Converting main.ino Library Dependency Finder -> LDF MODES: FINDER(chain) COMPATIBILITY(soft) Collected 35 compatible libraries Scanning dependencies... Dependency Graph |-- 1.3.0 |
|-- 6.10.0 | |-- 3.0.2 | |-- 1.2.0 | | |-- 1.0 | |-- 1.0 Compiling .pioenvs/nodemcuv2/src/main.ino.cpp.o Generating LD script .pioenvs/nodemcuv2/ld/local.eagle.app.v6.common.ld Archiving .pioenvs/nodemcuv2/libef5/libArduinoJson_ID64.a Archiving .pioenvs/nodemcuv2/libca3/libTaskScheduler_ID721.a Indexing .pioenvs/nodemcuv2/libef5/libArduinoJson_ID64.a Indexing .pioenvs/nodemcuv2/libca3/libTaskScheduler_ID721.a Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/BearSSLHelpers.cpp.o Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/CertStoreBearSSL.cpp.o Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/ESP8266WiFi.cpp.o Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/ESP8266WiFiAP.cpp.o Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/ESP8266WiFiGeneric.cpp.o Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/ESP8266WiFiMulti.cpp.o Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/ESP8266WiFiSTA-WPS.cpp.o Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/ESP8266WiFiSTA.cpp.o Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/ESP8266WiFiScan.cpp.o Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/WiFiClient.cpp.o Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/WiFiClientSecureAxTLS.cpp.o Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/WiFiClientSecureBearSSL.cpp.o Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/WiFiServer.cpp.o Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/WiFiServerSecureAxTLS.cpp.o Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/WiFiServerSecureBearSSL.cpp.o Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/WiFiUdp.cpp.o Compiling .pioenvs/nodemcuv2/lib129/ESPAsyncTCP_ID305/AsyncPrinter.cpp.o Compiling .pioenvs/nodemcuv2/lib129/ESPAsyncTCP_ID305/ESPAsyncTCP.cpp.o Compiling .pioenvs/nodemcuv2/lib129/ESPAsyncTCP_ID305/ESPAsyncTCPbuffer.cpp.o Archiving .pioenvs/nodemcuv2/lib6c2/libESP8266WiFi.a Indexing .pioenvs/nodemcuv2/lib6c2/libESP8266WiFi.a Compiling .pioenvs/nodemcuv2/lib129/ESPAsyncTCP_ID305/SyncClient.cpp.o Compiling .pioenvs/nodemcuv2/lib129/ESPAsyncTCP_ID305/tcp_axtls.c.o Compiling .pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/TaskScheduler.cpp.o Compiling .pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/painlessMesh.cpp.o Compiling .pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/painlessMeshAP.cpp.o Archiving .pioenvs/nodemcuv2/lib129/libESPAsyncTCP_ID305.a Indexing .pioenvs/nodemcuv2/lib129/libESPAsyncTCP_ID305.a Compiling .pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/painlessMeshComm.cpp.o Compiling .pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/painlessMeshConnection.cpp.o Compiling .pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/painlessMeshDebug.cpp.o Compiling .pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/painlessMeshJson.cpp.o .piolibdeps/painlessMesh_ID1269/src/painlessMeshComm.cpp: In member function 'String painlessMesh::buildMeshPackage(uint32_t, uint32_t, meshPackageType, String&)': .piolibdeps/painlessMesh_ID1269/src/painlessMeshComm.cpp:68:25: error: no matching function for call to 'ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument()' DynamicJsonDocument jsonBuffer; ^ .piolibdeps/painlessMesh_ID1269/src/painlessMeshComm.cpp:68:25: note: candidates are: In file included from .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/DynamicJsonDocument.hpp:7:0, from .piolibdeps/ArduinoJson_ID64/src/ArduinoJson.hpp:21, from .piolibdeps/ArduinoJson_ID64/src/ArduinoJson.h:9, from .piolibdeps/painlessMesh_ID1269/src/painlessMesh.h:12, from .piolibdeps/painlessMesh_ID1269/src/painlessMeshComm.cpp:8: .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:50:3: note: ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument(ArduinoJson6100_100::VariantRef) [with TAllocator = ArduinoJson6100_100::DefaultAllocator] BasicJsonDocument(VariantRef src) ^ .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:50:3: note: candidate expects 1 argument, 0 provided .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:43:3: note: template ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument(const T&, typename ArduinoJson6100_100::enable_if::value>::type*) BasicJsonDocument(const T& src, ^ .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:43:3: note: template argument deduction/substitution failed: .piolibdeps/painlessMesh_ID1269/src/painlessMeshComm.cpp:68:25: note: candidate expects 2 arguments, 0 provided DynamicJsonDocument jsonBuffer; ^ In file included from .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/DynamicJsonDocument.hpp:7:0, from .piolibdeps/ArduinoJson_ID64/src/ArduinoJson.hpp:21, from .piolibdeps/ArduinoJson_ID64/src/ArduinoJson.h:9, from .piolibdeps/painlessMesh_ID1269/src/painlessMesh.h:12, from .piolibdeps/painlessMesh_ID1269/src/painlessMeshComm.cpp:8: .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:36:3: note: ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument(const ArduinoJson6100_100::BasicJsonDocument&) [with TAllocator = ArduinoJson6100_100::DefaultAllocator] BasicJsonDocument(const BasicJsonDocument& src) ^ .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:36:3: note: candidate expects 1 argument, 0 provided .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:33:12: note: ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument(size_t, TAllocator) [with TAllocator = ArduinoJson6100_100::DefaultAllocator; size_t = unsigned int] explicit BasicJsonDocument(size_t capa, TAllocator allocator = TAllocator()) ^ .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:33:12: note: candidate expects 2 arguments, 0 provided .piolibdeps/painlessMesh_ID1269/src/painlessMeshConnection.cpp: In member function 'void MeshConnection::handleMessage(String&, uint32_t)': .piolibdeps/painlessMesh_ID1269/src/painlessMeshConnection.cpp:543:25: error: no matching function for call to 'ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument()' DynamicJsonDocument jsonBuffer; ^ .piolibdeps/painlessMesh_ID1269/src/painlessMeshConnection.cpp:543:25: note: candidates are: In file included from .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/DynamicJsonDocument.hpp:7:0, from .piolibdeps/ArduinoJson_ID64/src/ArduinoJson.hpp:21, from .piolibdeps/ArduinoJson_ID64/src/ArduinoJson.h:9, from .piolibdeps/painlessMesh_ID1269/src/painlessMesh.h:12, from .piolibdeps/painlessMesh_ID1269/src/painlessMeshConnection.cpp:9: .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:50:3: note: ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument(ArduinoJson6100_100::VariantRef) [with TAllocator = ArduinoJson6100_100::DefaultAllocator] BasicJsonDocument(VariantRef src) ^ .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:50:3: note: candidate expects 1 argument, 0 provided .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:43:3: note: template ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument(const T&, typename ArduinoJson6100_100::enable_if::value>::type*) BasicJsonDocument(const T& src, ^ .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:43:3: note: template argument deduction/substitution failed: .piolibdeps/painlessMesh_ID1269/src/painlessMeshConnection.cpp:543:25: note: candidate expects 2 arguments, 0 provided DynamicJsonDocument jsonBuffer; ^ In file included from .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/DynamicJsonDocument.hpp:7:0, from .piolibdeps/ArduinoJson_ID64/src/ArduinoJson.hpp:21, from .piolibdeps/ArduinoJson_ID64/src/ArduinoJson.h:9, from .piolibdeps/painlessMesh_ID1269/src/painlessMesh.h:12, from .piolibdeps/painlessMesh_ID1269/src/painlessMeshConnection.cpp:9: .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:36:3: note: ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument(const ArduinoJson6100_100::BasicJsonDocument&) [with TAllocator = ArduinoJson6100_100::DefaultAllocator] BasicJsonDocument(const BasicJsonDocument& src) ^ .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:36:3: note: candidate expects 1 argument, 0 provided .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:33:12: note: ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument(size_t, TAllocator) [with TAllocator = ArduinoJson6100_100::DefaultAllocator; size_t = unsigned int] explicit BasicJsonDocument(size_t capa, TAllocator allocator = TAllocator()) ^ .piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:33:12: note: candidate expects 2 arguments, 0 provided .piolibdeps/painlessMesh_ID1269/src/painlessMeshConnection.cpp:544:16: error: 'ArduinoJson6100_100::DynamicJsonDocument' has no member named 'nestingLimit' jsonBuffer.nestingLimit = 255; ^ * [.pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/painlessMeshComm.cpp.o] Error 1 * [.pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/painlessMeshConnection.cpp.o] Error 1 ======================================== [ERROR] Took 10.54 seconds ======================================== The terminal process terminated with exit code: 1
What am I doing wrong?
Thanks!