New header only lib give `error: redefinition of....` when using in a lib.
Created by: sticilface
reproducible with a simple lib,
#pragma once
#include <ArduinoJson.h>
class tstlib {
public:
tstlib() {}
private:
};
and the following sketch
#include <ArduinoJson.h>
#include <jsontestlib.h>
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
produces this error
/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware "/Applications/Arduino.app/Contents/Java/hardware" -hardware "/Users/amelvin/Library/Arduino15/packages" -tools "/Applications/Arduino.app/Contents/Java/tools-builder" -tools "/Applications/Arduino.app/Contents/Java/hardware/tools/avr" -tools "/Users/amelvin/Library/Arduino15/packages" -built-in-libraries "/Applications/Arduino.app/Contents/Java/libraries" -libraries "/Users/amelvin/Dropbox/Sketchbook/libraries" -fqbn=esp8266com:esp8266:generic:CpuFrequency=160,FlashFreq=80,FlashMode=dio,UploadSpeed=460800,FlashSize=4M3M,ResetMethod=nodemcu,Debug=Disabled,DebugLevel=None____ -ide-version=10608 -build-path "/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "/Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino"
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware "/Applications/Arduino.app/Contents/Java/hardware" -hardware "/Users/amelvin/Library/Arduino15/packages" -tools "/Applications/Arduino.app/Contents/Java/tools-builder" -tools "/Applications/Arduino.app/Contents/Java/hardware/tools/avr" -tools "/Users/amelvin/Library/Arduino15/packages" -built-in-libraries "/Applications/Arduino.app/Contents/Java/libraries" -libraries "/Users/amelvin/Dropbox/Sketchbook/libraries" -fqbn=esp8266com:esp8266:generic:CpuFrequency=160,FlashFreq=80,FlashMode=dio,UploadSpeed=460800,FlashSize=4M3M,ResetMethod=nodemcu,Debug=Disabled,DebugLevel=None____ -ide-version=10608 -build-path "/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "/Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino"
WARNING: Spurious .github folder in 'Adafruit GPS Library' library
WARNING: Spurious .github folder in 'ArduinoJson' library
"/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/sdk/include" "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DARDUINO=10608 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266" "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/variants/generic" "/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp/sketch/deleteme.ino.cpp" -o "/dev/null"
"/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/sdk/include" "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DARDUINO=10608 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266" "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/variants/generic" "-I/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson" "/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp/sketch/deleteme.ino.cpp" -o "/dev/null"
"/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/sdk/include" "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DARDUINO=10608 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266" "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/variants/generic" "-I/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson" "-I/Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src" "/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp/sketch/deleteme.ino.cpp" -o "/dev/null"
"/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/sdk/include" "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DARDUINO=10608 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266" "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/variants/generic" "-I/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson" "-I/Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src" "/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp/sketch/deleteme.ino.cpp" -o "/dev/null"
"/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/sdk/include" "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DARDUINO=10608 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266" "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/variants/generic" "-I/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson" "-I/Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src" "/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp/sketch/deleteme.ino.cpp" -o "/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp/preproc/ctags_target_for_gcc_minus_e.cpp"
"/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp/preproc/ctags_target_for_gcc_minus_e.cpp"
"/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/sdk/include" "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=160000000L -DLWIP_OPEN_SRC -DARDUINO=10608 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_ESP01" -DESP8266 "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266" "-I/Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/variants/generic" "-I/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson" "-I/Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src" "/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp/sketch/deleteme.ino.cpp" -o "/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/buildbace5913cf09c247fdfa73b6367fdf8c.tmp/sketch/deleteme.ino.cpp.o"
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src/jsontestlib.h:4,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:2:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:11:13: error: redefinition of 'bool ArduinoJson::Internals::JsonParser::skip(char)'
inline bool ArduinoJson::Internals::JsonParser::skip(char charToSkip) {
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:1:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:11:13: error: 'bool ArduinoJson::Internals::JsonParser::skip(char)' previously defined here
inline bool ArduinoJson::Internals::JsonParser::skip(char charToSkip) {
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src/jsontestlib.h:4,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:2:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:19:13: error: redefinition of 'bool ArduinoJson::Internals::JsonParser::parseAnythingTo(ArduinoJson::JsonVariant*)'
inline bool ArduinoJson::Internals::JsonParser::parseAnythingTo(
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:1:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:19:13: error: 'bool ArduinoJson::Internals::JsonParser::parseAnythingTo(ArduinoJson::JsonVariant*)' previously defined here
inline bool ArduinoJson::Internals::JsonParser::parseAnythingTo(
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src/jsontestlib.h:4,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:2:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:28:13: error: redefinition of 'bool ArduinoJson::Internals::JsonParser::parseAnythingToUnsafe(ArduinoJson::JsonVariant*)'
inline bool ArduinoJson::Internals::JsonParser::parseAnythingToUnsafe(
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:1:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:28:13: error: 'bool ArduinoJson::Internals::JsonParser::parseAnythingToUnsafe(ArduinoJson::JsonVariant*)' previously defined here
inline bool ArduinoJson::Internals::JsonParser::parseAnythingToUnsafe(
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src/jsontestlib.h:4,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:2:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:45:1: error: redefinition of 'ArduinoJson::JsonArray& ArduinoJson::Internals::JsonParser::parseArray()'
ArduinoJson::Internals::JsonParser::parseArray() {
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:1:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:45:1: error: 'ArduinoJson::JsonArray& ArduinoJson::Internals::JsonParser::parseArray()' previously defined here
ArduinoJson::Internals::JsonParser::parseArray() {
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src/jsontestlib.h:4,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:2:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:76:13: error: redefinition of 'bool ArduinoJson::Internals::JsonParser::parseArrayTo(ArduinoJson::JsonVariant*)'
inline bool ArduinoJson::Internals::JsonParser::parseArrayTo(
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:1:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:76:13: error: 'bool ArduinoJson::Internals::JsonParser::parseArrayTo(ArduinoJson::JsonVariant*)' previously defined here
inline bool ArduinoJson::Internals::JsonParser::parseArrayTo(
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src/jsontestlib.h:4,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:2:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:86:1: error: redefinition of 'ArduinoJson::JsonObject& ArduinoJson::Internals::JsonParser::parseObject()'
ArduinoJson::Internals::JsonParser::parseObject() {
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:1:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:86:1: error: 'ArduinoJson::JsonObject& ArduinoJson::Internals::JsonParser::parseObject()' previously defined here
ArduinoJson::Internals::JsonParser::parseObject() {
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src/jsontestlib.h:4,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:2:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:124:13: error: redefinition of 'bool ArduinoJson::Internals::JsonParser::parseObjectTo(ArduinoJson::JsonVariant*)'
inline bool ArduinoJson::Internals::JsonParser::parseObjectTo(
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:1:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:124:13: error: 'bool ArduinoJson::Internals::JsonParser::parseObjectTo(ArduinoJson::JsonVariant*)' previously defined here
inline bool ArduinoJson::Internals::JsonParser::parseObjectTo(
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src/jsontestlib.h:4,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:2:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:133:20: error: redefinition of 'const char* ArduinoJson::Internals::JsonParser::parseString()'
inline const char *ArduinoJson::Internals::JsonParser::parseString() {
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:1:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:133:20: error: 'const char* ArduinoJson::Internals::JsonParser::parseString()' previously defined here
inline const char *ArduinoJson::Internals::JsonParser::parseString() {
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src/jsontestlib.h:4,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:2:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:178:13: error: redefinition of 'bool ArduinoJson::Internals::JsonParser::parseStringTo(ArduinoJson::JsonVariant*)'
inline bool ArduinoJson::Internals::JsonParser::parseStringTo(
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:15:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:1:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/Internals/JsonParser.ipp:178:13: error: 'bool ArduinoJson::Internals::JsonParser::parseStringTo(ArduinoJson::JsonVariant*)' previously defined here
inline bool ArduinoJson::Internals::JsonParser::parseStringTo(
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:17:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src/jsontestlib.h:4,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:2:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/JsonBuffer.ipp:10:32: error: redefinition of 'ArduinoJson::JsonArray& ArduinoJson::JsonBuffer::createArray()'
inline ArduinoJson::JsonArray &ArduinoJson::JsonBuffer::createArray() {
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:17:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:1:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/JsonBuffer.ipp:10:32: error: 'ArduinoJson::JsonArray& ArduinoJson::JsonBuffer::createArray()' previously defined here
inline ArduinoJson::JsonArray &ArduinoJson::JsonBuffer::createArray() {
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:17:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src/jsontestlib.h:4,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:2:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/JsonBuffer.ipp:15:33: error: redefinition of 'ArduinoJson::JsonObject& ArduinoJson::JsonBuffer::createObject()'
inline ArduinoJson::JsonObject &ArduinoJson::JsonBuffer::createObject() {
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:17:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:1:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/JsonBuffer.ipp:15:33: error: 'ArduinoJson::JsonObject& ArduinoJson::JsonBuffer::createObject()' previously defined here
inline ArduinoJson::JsonObject &ArduinoJson::JsonBuffer::createObject() {
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:17:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src/jsontestlib.h:4,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:2:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/JsonBuffer.ipp:20:32: error: redefinition of 'ArduinoJson::JsonArray& ArduinoJson::JsonBuffer::parseArray(char*, uint8_t)'
inline ArduinoJson::JsonArray &ArduinoJson::JsonBuffer::parseArray(
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:17:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:1:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/JsonBuffer.ipp:20:32: error: 'ArduinoJson::JsonArray& ArduinoJson::JsonBuffer::parseArray(char*, uint8_t)' previously defined here
inline ArduinoJson::JsonArray &ArduinoJson::JsonBuffer::parseArray(
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:17:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src/jsontestlib.h:4,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:2:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/JsonBuffer.ipp:26:33: error: redefinition of 'ArduinoJson::JsonObject& ArduinoJson::JsonBuffer::parseObject(char*, uint8_t)'
inline ArduinoJson::JsonObject &ArduinoJson::JsonBuffer::parseObject(
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:17:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:1:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/JsonBuffer.ipp:26:33: error: 'ArduinoJson::JsonObject& ArduinoJson::JsonBuffer::parseObject(char*, uint8_t)' previously defined here
inline ArduinoJson::JsonObject &ArduinoJson::JsonBuffer::parseObject(
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:17:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src/jsontestlib.h:4,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:2:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/JsonBuffer.ipp:32:33: error: redefinition of 'ArduinoJson::JsonVariant ArduinoJson::JsonBuffer::parse(char*, uint8_t)'
inline ArduinoJson::JsonVariant ArduinoJson::JsonBuffer::parse(
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:17:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:1:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/JsonBuffer.ipp:32:33: error: 'ArduinoJson::JsonVariant ArduinoJson::JsonBuffer::parse(char*, uint8_t)' previously defined here
inline ArduinoJson::JsonVariant ArduinoJson::JsonBuffer::parse(
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:17:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib/src/jsontestlib.h:4,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:2:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/JsonBuffer.ipp:38:14: error: redefinition of 'char* ArduinoJson::JsonBuffer::strdup(const char*, size_t)'
inline char *ArduinoJson::JsonBuffer::strdup(const char *source,
^
In file included from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.hpp:17:0,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/ArduinoJson.h:8,
from /Users/amelvin/Dropbox/Sketchbook/deleteme/deleteme.ino:1:
/Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson/include/ArduinoJson/JsonBuffer.ipp:38:14: error: 'char* ArduinoJson::JsonBuffer::strdup(const char*, size_t)' previously defined here
inline char *ArduinoJson::JsonBuffer::strdup(const char *source,
^
Using library ArduinoJson at version 5.6.0 in folder: /Users/amelvin/Dropbox/Sketchbook/libraries/ArduinoJson
Using library jsontestlib at version 1.1 in folder: /Users/amelvin/Dropbox/Sketchbook/libraries/jsontestlib
exit status 1
Error compiling for board Generic ESP8266 Module.
solved by adding
#pragma once
to the top of ArduinoJson.hpp