I'm implementing another library that relies on this one. So to be able to use objects and methods from this library I had exactly one include
of this library in my main header file.
Something like this in mylibrary.h
I'm trying to compile the sketch and am getting a bunch of errors about multiple definitions:
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::messageReceived(WSclient_t*, WSopcode_t, unsigned char*, unsigned int, bool)':
/Users/kostik/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-97-gc752ad5-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_tree.h:2223: multiple definition of `WebSocketsClient::messageReceived(WSclient_t*, WSopcode_t, unsigned char*, unsigned int, bool)'
/sketch/mylibrary-Test.ino.cpp.o:/Users/kostik/Projects/Arduino/libraries/WebSockets_Generic/src/WebSocketsClient_Generic-Impl.h:806: first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSockets::write(WSclient_t*, unsigned char*, unsigned int)':
mylibrary.cpp:(.text._ZN10WebSockets5writeEP10WSclient_tPhj+0x0): multiple definition of `WebSockets::write(WSclient_t*, unsigned char*, unsigned int)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN10WebSockets5writeEP10WSclient_tPhj+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::clientDisconnect(WSclient_t*)':
mylibrary.cpp:(.text._ZN16WebSocketsClient16clientDisconnectEP10WSclient_t+0x0): multiple definition of `WebSocketsClient::clientDisconnect(WSclient_t*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient16clientDisconnectEP10WSclient_t+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::clientIsConnected(WSclient_t*)':
mylibrary.cpp:(.text._ZN16WebSocketsClient17clientIsConnectedEP10WSclient_t+0x0): multiple definition of `WebSocketsClient::clientIsConnected(WSclient_t*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient17clientIsConnectedEP10WSclient_t+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WS_IPAddressToString(IPAddress const&)':
mylibrary.cpp:(.text._Z20WS_IPAddressToStringRK9IPAddress+0x0): multiple definition of `WS_IPAddressToString(IPAddress const&)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._Z20WS_IPAddressToStringRK9IPAddress+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSockets::createHeader(unsigned char*, WSopcode_t, unsigned int, bool, unsigned char*, bool)':
mylibrary.cpp:(.text._ZN10WebSockets12createHeaderEPh10WSopcode_tjbS0_b+0x0): multiple definition of `WebSockets::createHeader(unsigned char*, WSopcode_t, unsigned int, bool, unsigned char*, bool)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN10WebSockets12createHeaderEPh10WSopcode_tjbS0_b+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSockets::sendFrameHeader(WSclient_t*, WSopcode_t, unsigned int, bool)':
mylibrary.cpp:(.text._ZN10WebSockets15sendFrameHeaderEP10WSclient_t10WSopcode_tjb+0x0): multiple definition of `WebSockets::sendFrameHeader(WSclient_t*, WSopcode_t, unsigned int, bool)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN10WebSockets15sendFrameHeaderEP10WSclient_t10WSopcode_tjb+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSockets::sendFrame(WSclient_t*, WSopcode_t, unsigned char*, unsigned int, bool, bool)':
mylibrary.cpp:(.text._ZN10WebSockets9sendFrameEP10WSclient_t10WSopcode_tPhjbb+0x0): multiple definition of `WebSockets::sendFrame(WSclient_t*, WSopcode_t, unsigned char*, unsigned int, bool, bool)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN10WebSockets9sendFrameEP10WSclient_t10WSopcode_tPhjbb+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSockets::clientDisconnect(WSclient_t*, unsigned short, char*, unsigned int)':
mylibrary.cpp:(.text._ZN10WebSockets16clientDisconnectEP10WSclient_ttPcj+0x0): multiple definition of `WebSockets::clientDisconnect(WSclient_t*, unsigned short, char*, unsigned int)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN10WebSockets16clientDisconnectEP10WSclient_ttPcj+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSockets::handleWebsocketPayloadCb(WSclient_t*, bool, unsigned char*)':
mylibrary.cpp:(.text._ZN10WebSockets24handleWebsocketPayloadCbEP10WSclient_tbPh+0x0): multiple definition of `WebSockets::handleWebsocketPayloadCb(WSclient_t*, bool, unsigned char*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN10WebSockets24handleWebsocketPayloadCbEP10WSclient_tbPh+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSockets::headerDone(WSclient_t*)':
mylibrary.cpp:(.text._ZN10WebSockets10headerDoneEP10WSclient_t+0x0): multiple definition of `WebSockets::headerDone(WSclient_t*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN10WebSockets10headerDoneEP10WSclient_t+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSockets::base64_encode(unsigned char*, unsigned int)':
mylibrary.cpp:(.text._ZN10WebSockets13base64_encodeEPhj+0x0): multiple definition of `WebSockets::base64_encode(unsigned char*, unsigned int)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN10WebSockets13base64_encodeEPhj+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSockets::acceptKey(String&)':
mylibrary.cpp:(.text._ZN10WebSockets9acceptKeyER6String+0x0): multiple definition of `WebSockets::acceptKey(String&)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN10WebSockets9acceptKeyER6String+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSockets::write(WSclient_t*, char const*)':
mylibrary.cpp:(.text._ZN10WebSockets5writeEP10WSclient_tPKc+0x0): multiple definition of `WebSockets::write(WSclient_t*, char const*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN10WebSockets5writeEP10WSclient_tPKc+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSockets::enableHeartbeat(WSclient_t*, unsigned int const&, unsigned int const&, unsigned char const&)':
mylibrary.cpp:(.text._ZN10WebSockets15enableHeartbeatEP10WSclient_tRKjS3_RKh+0x0): multiple definition of `WebSockets::enableHeartbeat(WSclient_t*, unsigned int const&, unsigned int const&, unsigned char const&)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN10WebSockets15enableHeartbeatEP10WSclient_tRKjS3_RKh+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSockets::handleHBTimeout(WSclient_t*)':
mylibrary.cpp:(.text._ZN10WebSockets15handleHBTimeoutEP10WSclient_t+0x0): multiple definition of `WebSockets::handleHBTimeout(WSclient_t*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN10WebSockets15handleHBTimeoutEP10WSclient_t+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::WebSocketsClient()':
mylibrary.cpp:(.text._ZN16WebSocketsClientC2Ev+0x0): multiple definition of `WebSocketsClient::WebSocketsClient()'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClientC2Ev+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::WebSocketsClient()':
mylibrary.cpp:(.text._ZN16WebSocketsClientC2Ev+0x0): multiple definition of `WebSocketsClient::WebSocketsClient()'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClientC2Ev+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::begin(char const*, unsigned short const&, char const*, char const*)':
mylibrary.cpp:(.text._ZN16WebSocketsClient5beginEPKcRKtS1_S1_+0x0): multiple definition of `WebSocketsClient::begin(char const*, unsigned short const&, char const*, char const*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient5beginEPKcRKtS1_S1_+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::begin(String const&, unsigned short const&, String const&, String const&)':
mylibrary.cpp:(.text._ZN16WebSocketsClient5beginERK6StringRKtS2_S2_+0x0): multiple definition of `WebSocketsClient::begin(String const&, unsigned short const&, String const&, String const&)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient5beginERK6StringRKtS2_S2_+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::begin(IPAddress const&, unsigned short const&, char const*, char const*)':
mylibrary.cpp:(.text._ZN16WebSocketsClient5beginERK9IPAddressRKtPKcS6_+0x0): multiple definition of `WebSocketsClient::begin(IPAddress const&, unsigned short const&, char const*, char const*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient5beginERK9IPAddressRKtPKcS6_+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::begin(IPAddress const&, unsigned short const&, String const&, String const&)':
mylibrary.cpp:(.text._ZN16WebSocketsClient5beginERK9IPAddressRKtRK6StringS7_+0x0): multiple definition of `WebSocketsClient::begin(IPAddress const&, unsigned short const&, String const&, String const&)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient5beginERK9IPAddressRKtRK6StringS7_+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::beginSSL(char const*, unsigned short const&, char const*, char const*, char const*)':
mylibrary.cpp:(.text._ZN16WebSocketsClient8beginSSLEPKcRKtS1_S1_S1_+0x0): multiple definition of `WebSocketsClient::beginSSL(char const*, unsigned short const&, char const*, char const*, char const*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient8beginSSLEPKcRKtS1_S1_S1_+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::beginSSL(String const&, unsigned short const&, String const&, String const&, String const&)':
mylibrary.cpp:(.text._ZN16WebSocketsClient8beginSSLERK6StringRKtS2_S2_S2_+0x0): multiple definition of `WebSocketsClient::beginSSL(String const&, unsigned short const&, String const&, String const&, String const&)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient8beginSSLERK6StringRKtS2_S2_S2_+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::beginSSL(IPAddress const&, unsigned short const&, String const&, String const&, String const&)':
mylibrary.cpp:(.text._ZN16WebSocketsClient8beginSSLERK9IPAddressRKtRK6StringS7_S7_+0x0): multiple definition of `WebSocketsClient::beginSSL(IPAddress const&, unsigned short const&, String const&, String const&, String const&)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient8beginSSLERK9IPAddressRKtRK6StringS7_S7_+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::beginSslWithCA(char const*, unsigned short const&, char const*, char const*, char const*)':
mylibrary.cpp:(.text._ZN16WebSocketsClient14beginSslWithCAEPKcRKtS1_S1_S1_+0x0): multiple definition of `WebSocketsClient::beginSslWithCA(char const*, unsigned short const&, char const*, char const*, char const*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient14beginSslWithCAEPKcRKtS1_S1_S1_+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::beginSocketIO(char const*, unsigned short const&, char const*, char const*)':
mylibrary.cpp:(.text._ZN16WebSocketsClient13beginSocketIOEPKcRKtS1_S1_+0x0): multiple definition of `WebSocketsClient::beginSocketIO(char const*, unsigned short const&, char const*, char const*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient13beginSocketIOEPKcRKtS1_S1_+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::beginSocketIO(String const&, unsigned short const&, String const&, String const&)':
mylibrary.cpp:(.text._ZN16WebSocketsClient13beginSocketIOERK6StringRKtS2_S2_+0x0): multiple definition of `WebSocketsClient::beginSocketIO(String const&, unsigned short const&, String const&, String const&)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient13beginSocketIOERK6StringRKtS2_S2_+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::beginSocketIO(IPAddress const&, unsigned short const&, String const&, String const&)':
mylibrary.cpp:(.text._ZN16WebSocketsClient13beginSocketIOERK9IPAddressRKtRK6StringS7_+0x0): multiple definition of `WebSocketsClient::beginSocketIO(IPAddress const&, unsigned short const&, String const&, String const&)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient13beginSocketIOERK9IPAddressRKtRK6StringS7_+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::beginSocketIOSSL(char const*, unsigned short const&, char const*, char const*)':
mylibrary.cpp:(.text._ZN16WebSocketsClient16beginSocketIOSSLEPKcRKtS1_S1_+0x0): multiple definition of `WebSocketsClient::beginSocketIOSSL(char const*, unsigned short const&, char const*, char const*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient16beginSocketIOSSLEPKcRKtS1_S1_+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::beginSocketIOSSL(String const&, unsigned short const&, String const&, String const&)':
mylibrary.cpp:(.text._ZN16WebSocketsClient16beginSocketIOSSLERK6StringRKtS2_S2_+0x0): multiple definition of `WebSocketsClient::beginSocketIOSSL(String const&, unsigned short const&, String const&, String const&)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient16beginSocketIOSSLERK6StringRKtS2_S2_+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::beginSocketIOSSL(IPAddress const&, unsigned short const&, String const&, String const&)':
mylibrary.cpp:(.text._ZN16WebSocketsClient16beginSocketIOSSLERK9IPAddressRKtRK6StringS7_+0x0): multiple definition of `WebSocketsClient::beginSocketIOSSL(IPAddress const&, unsigned short const&, String const&, String const&)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient16beginSocketIOSSLERK9IPAddressRKtRK6StringS7_+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::beginSocketIOSSLWithCA(char const*, unsigned short const&, char const*, char const*, char const*)':
mylibrary.cpp:(.text._ZN16WebSocketsClient22beginSocketIOSSLWithCAEPKcRKtS1_S1_S1_+0x0): multiple definition of `WebSocketsClient::beginSocketIOSSLWithCA(char const*, unsigned short const&, char const*, char const*, char const*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient22beginSocketIOSSLWithCAEPKcRKtS1_S1_S1_+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::sendTXT(unsigned char*, unsigned int, bool)':
mylibrary.cpp:(.text._ZN16WebSocketsClient7sendTXTEPhjb+0x0): multiple definition of `WebSocketsClient::sendTXT(unsigned char*, unsigned int, bool)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient7sendTXTEPhjb+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::sendTXT(char*, unsigned int, bool)':
mylibrary.cpp:(.text._ZN16WebSocketsClient7sendTXTEPcjb+0x0): multiple definition of `WebSocketsClient::sendTXT(char*, unsigned int, bool)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient7sendTXTEPcjb+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::sendTXT(char const*, unsigned int)':
mylibrary.cpp:(.text._ZN16WebSocketsClient7sendTXTEPKcj+0x0): multiple definition of `WebSocketsClient::sendTXT(char const*, unsigned int)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient7sendTXTEPKcj+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::sendTXT(unsigned char const*, unsigned int)':
mylibrary.cpp:(.text._ZN16WebSocketsClient7sendTXTEPKhj+0x0): multiple definition of `WebSocketsClient::sendTXT(unsigned char const*, unsigned int)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient7sendTXTEPKhj+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::sendTXT(String const&)':
mylibrary.cpp:(.text._ZN16WebSocketsClient7sendTXTERK6String+0x0): multiple definition of `WebSocketsClient::sendTXT(String const&)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient7sendTXTERK6String+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::sendTXT(char)':
mylibrary.cpp:(.text._ZN16WebSocketsClient7sendTXTEc+0x0): multiple definition of `WebSocketsClient::sendTXT(char)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient7sendTXTEc+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::sendBIN(unsigned char*, unsigned int, bool)':
mylibrary.cpp:(.text._ZN16WebSocketsClient7sendBINEPhjb+0x0): multiple definition of `WebSocketsClient::sendBIN(unsigned char*, unsigned int, bool)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient7sendBINEPhjb+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::sendBIN(unsigned char const*, unsigned int)':
mylibrary.cpp:(.text._ZN16WebSocketsClient7sendBINEPKhj+0x0): multiple definition of `WebSocketsClient::sendBIN(unsigned char const*, unsigned int)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient7sendBINEPKhj+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::sendPing(unsigned char*, unsigned int)':
mylibrary.cpp:(.text._ZN16WebSocketsClient8sendPingEPhj+0x0): multiple definition of `WebSocketsClient::sendPing(unsigned char*, unsigned int)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient8sendPingEPhj+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::sendPing(String const&)':
mylibrary.cpp:(.text._ZN16WebSocketsClient8sendPingERK6String+0x0): multiple definition of `WebSocketsClient::sendPing(String const&)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient8sendPingERK6String+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::disconnect()':
mylibrary.cpp:(.text._ZN16WebSocketsClient10disconnectEv+0x0): multiple definition of `WebSocketsClient::disconnect()'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient10disconnectEv+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::~WebSocketsClient()':
mylibrary.cpp:(.text._ZN16WebSocketsClientD2Ev+0x0): multiple definition of `WebSocketsClient::~WebSocketsClient()'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClientD2Ev+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::~WebSocketsClient()':
mylibrary.cpp:(.text._ZN16WebSocketsClientD2Ev+0x0): multiple definition of `WebSocketsClient::~WebSocketsClient()'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClientD2Ev+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::~WebSocketsClient()':
mylibrary.cpp:(.text._ZN16WebSocketsClientD0Ev+0x0): multiple definition of `WebSocketsClient::~WebSocketsClient()'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClientD0Ev+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::setAuthorization(char const*, char const*)':
mylibrary.cpp:(.text._ZN16WebSocketsClient16setAuthorizationEPKcS1_+0x0): multiple definition of `WebSocketsClient::setAuthorization(char const*, char const*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient16setAuthorizationEPKcS1_+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::setAuthorization(char const*)':
mylibrary.cpp:(.text._ZN16WebSocketsClient16setAuthorizationEPKc+0x0): multiple definition of `WebSocketsClient::setAuthorization(char const*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient16setAuthorizationEPKc+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::setExtraHeaders(char const*)':
mylibrary.cpp:(.text._ZN16WebSocketsClient15setExtraHeadersEPKc+0x0): multiple definition of `WebSocketsClient::setExtraHeaders(char const*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient15setExtraHeadersEPKc+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::setReconnectInterval(unsigned long const&)':
mylibrary.cpp:(.text._ZN16WebSocketsClient20setReconnectIntervalERKm+0x0): multiple definition of `WebSocketsClient::setReconnectInterval(unsigned long const&)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient20setReconnectIntervalERKm+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::isConnected()':
mylibrary.cpp:(.text._ZN16WebSocketsClient11isConnectedEv+0x0): multiple definition of `WebSocketsClient::isConnected()'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient11isConnectedEv+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::sendHeader(WSclient_t*)':
mylibrary.cpp:(.text._ZN16WebSocketsClient10sendHeaderEP10WSclient_t+0x0): multiple definition of `WebSocketsClient::sendHeader(WSclient_t*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient10sendHeaderEP10WSclient_t+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::handleHeader(WSclient_t*, String*)':
mylibrary.cpp:(.text._ZN16WebSocketsClient12handleHeaderEP10WSclient_tP6String+0x0): multiple definition of `WebSocketsClient::handleHeader(WSclient_t*, String*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient12handleHeaderEP10WSclient_tP6String+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::connectedCb()':
mylibrary.cpp:(.text._ZN16WebSocketsClient11connectedCbEv+0x0): multiple definition of `WebSocketsClient::connectedCb()'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient11connectedCbEv+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::connectFailedCb()':
mylibrary.cpp:(.text._ZN16WebSocketsClient15connectFailedCbEv+0x0): multiple definition of `WebSocketsClient::connectFailedCb()'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient15connectFailedCbEv+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::handleHBPing()':
mylibrary.cpp:(.text._ZN16WebSocketsClient12handleHBPingEv+0x0): multiple definition of `WebSocketsClient::handleHBPing()'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient12handleHBPingEv+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::enableHeartbeat(unsigned int const&, unsigned int const&, unsigned char const&)':
mylibrary.cpp:(.text._ZN16WebSocketsClient15enableHeartbeatERKjS1_RKh+0x0): multiple definition of `WebSocketsClient::enableHeartbeat(unsigned int const&, unsigned int const&, unsigned char const&)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient15enableHeartbeatERKjS1_RKh+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::disableHeartbeat()':
mylibrary.cpp:(.text._ZN16WebSocketsClient16disableHeartbeatEv+0x0): multiple definition of `WebSocketsClient::disableHeartbeat()'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient16disableHeartbeatEv+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSockets::readCb(WSclient_t*, unsigned char*, unsigned int, std::function<void (WSclient_t*, bool)>)':
mylibrary.cpp:(.text._ZN10WebSockets6readCbEP10WSclient_tPhjSt8functionIFvS1_bEE+0x0): multiple definition of `WebSockets::readCb(WSclient_t*, unsigned char*, unsigned int, std::function<void (WSclient_t*, bool)>)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN10WebSockets6readCbEP10WSclient_tPhjSt8functionIFvS1_bEE+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSockets::handleWebsocketWaitFor(WSclient_t*, unsigned int)':
mylibrary.cpp:(.text._ZN10WebSockets22handleWebsocketWaitForEP10WSclient_tj+0x0): multiple definition of `WebSockets::handleWebsocketWaitFor(WSclient_t*, unsigned int)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN10WebSockets22handleWebsocketWaitForEP10WSclient_tj+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSockets::handleWebsocketCb(WSclient_t*)':
mylibrary.cpp:(.text._ZN10WebSockets17handleWebsocketCbEP10WSclient_t+0x0): multiple definition of `WebSockets::handleWebsocketCb(WSclient_t*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN10WebSockets17handleWebsocketCbEP10WSclient_t+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSockets::handleWebsocket(WSclient_t*)':
mylibrary.cpp:(.text._ZN10WebSockets15handleWebsocketEP10WSclient_t+0x0): multiple definition of `WebSockets::handleWebsocket(WSclient_t*)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN10WebSockets15handleWebsocketEP10WSclient_t+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::handleClientData()':
mylibrary.cpp:(.text._ZN16WebSocketsClient16handleClientDataEv+0x0): multiple definition of `WebSocketsClient::handleClientData()'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient16handleClientDataEv+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::loop()':
mylibrary.cpp:(.text._ZN16WebSocketsClient4loopEv+0x0): multiple definition of `WebSocketsClient::loop()'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient4loopEv+0x0): first defined here
/libraries/mylibrary/mylibrary.cpp.o: In function `WebSocketsClient::onEvent(std::function<void (WStype_t, unsigned char*, unsigned int)>)':
mylibrary.cpp:(.text._ZN16WebSocketsClient7onEventESt8functionIFv8WStype_tPhjEE+0x0): multiple definition of `WebSocketsClient::onEvent(std::function<void (WStype_t, unsigned char*, unsigned int)>)'
/sketch/mylibrary-Test.ino.cpp.o:mylibrary-Test.ino.cpp:(.text._ZN16WebSocketsClient7onEventESt8functionIFv8WStype_tPhjEE+0x0): first defined here
collect2: error: ld returned 1 exit status