yubox-node-org / AsyncTCPSock

Reimplementation of the API of me-no-dev/AsyncTCP using high-level BSD sockets
GNU Lesser General Public License v3.0
20 stars 10 forks source link

Redefinitions when using with ESPAsyncWebServer #8

Closed davidkleng closed 3 years ago

davidkleng commented 3 years ago

Hi, when I try to use both libs im getting errors about redefinition of functions. Here is a copy of the console.

.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::connect(IPAddress, unsigned short)':
c:\users\david\.platformio\packages\toolchain-xtensa32\xtensa-esp32-elf\include\c++\5.2.0/functional:2077: multiple definition of `AsyncClient::connect(IPAddress, unsigned short)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):c:\users\david\.platformio\packages\toolchain-xtensa32\xtensa-esp32-elf\include\c++\5.2.0\bits/move.h:188: first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::connect(char const*, unsigned short)':
AsyncTCP.cpp:(.text._ZN11AsyncClient7connectEPKct+0x0): multiple definition of `AsyncClient::connect(char const*, unsigned short)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient7connectEPKct+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::abort()':
AsyncTCP.cpp:(.text._ZN11AsyncClient5abortEv+0x0): multiple definition of `AsyncClient::abort()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient5abortEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::space()':
AsyncTCP.cpp:(.text._ZN11AsyncClient5spaceEv+0x0): multiple definition of `AsyncClient::space()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient5spaceEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::add(char const*, unsigned int, unsigned char)':
AsyncTCP.cpp:(.text._ZN11AsyncClient3addEPKcjh+0x0): multiple definition of `AsyncClient::add(char const*, unsigned int, unsigned char)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient3addEPKcjh+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::send()':
AsyncTCP.cpp:(.text._ZN11AsyncClient4sendEv+0x0): multiple definition of `AsyncClient::send()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient4sendEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::free()':
AsyncTCP.cpp:(.text._ZN11AsyncClient4freeEv+0x0): multiple definition of `AsyncClient::free()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient4freeEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::write(char const*, unsigned int, unsigned char)':
AsyncTCP.cpp:(.text._ZN11AsyncClient5writeEPKcjh+0x0): multiple definition of `AsyncClient::write(char const*, unsigned int, unsigned char)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient5writeEPKcjh+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::write(char const*)':
AsyncTCP.cpp:(.text._ZN11AsyncClient5writeEPKc+0x0): multiple definition of `AsyncClient::write(char const*)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient5writeEPKc+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::setRxTimeout(unsigned int)':
AsyncTCP.cpp:(.text._ZN11AsyncClient12setRxTimeoutEj+0x0): multiple definition of `AsyncClient::setRxTimeout(unsigned int)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient12setRxTimeoutEj+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::getRxTimeout()':
AsyncTCP.cpp:(.text._ZN11AsyncClient12getRxTimeoutEv+0x0): multiple definition of `AsyncClient::getRxTimeout()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient12getRxTimeoutEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::getAckTimeout()':
AsyncTCP.cpp:(.text._ZN11AsyncClient13getAckTimeoutEv+0x0): multiple definition of `AsyncClient::getAckTimeout()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient13getAckTimeoutEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::setAckTimeout(unsigned int)':
AsyncTCP.cpp:(.text._ZN11AsyncClient13setAckTimeoutEj+0x0): multiple definition of `AsyncClient::setAckTimeout(unsigned int)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient13setAckTimeoutEj+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::setNoDelay(bool)':
AsyncTCP.cpp:(.text._ZN11AsyncClient10setNoDelayEb+0x0): multiple definition of `AsyncClient::setNoDelay(bool)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient10setNoDelayEb+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::getNoDelay()':
AsyncTCP.cpp:(.text._ZN11AsyncClient10getNoDelayEv+0x0): multiple definition of `AsyncClient::getNoDelay()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient10getNoDelayEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::getRemoteAddress()':
AsyncTCP.cpp:(.text._ZN11AsyncClient16getRemoteAddressEv+0x0): multiple definition of `AsyncClient::getRemoteAddress()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient16getRemoteAddressEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::getRemotePort()':
AsyncTCP.cpp:(.text._ZN11AsyncClient13getRemotePortEv+0x0): multiple definition of `AsyncClient::getRemotePort()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient13getRemotePortEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::getLocalAddress()':
AsyncTCP.cpp:(.text._ZN11AsyncClient15getLocalAddressEv+0x0): multiple definition of `AsyncClient::getLocalAddress()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient15getLocalAddressEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::getLocalPort()':
AsyncTCP.cpp:(.text._ZN11AsyncClient12getLocalPortEv+0x0): multiple definition of `AsyncClient::getLocalPort()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient12getLocalPortEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::remoteIP()':
AsyncTCP.cpp:(.text._ZN11AsyncClient8remoteIPEv+0x0): multiple definition of `AsyncClient::remoteIP()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient8remoteIPEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::remotePort()':
AsyncTCP.cpp:(.text._ZN11AsyncClient10remotePortEv+0x0): multiple definition of `AsyncClient::remotePort()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient10remotePortEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::localIP()':
AsyncTCP.cpp:(.text._ZN11AsyncClient7localIPEv+0x0): multiple definition of `AsyncClient::localIP()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient7localIPEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::localPort()':
AsyncTCP.cpp:(.text._ZN11AsyncClient9localPortEv+0x0): multiple definition of `AsyncClient::localPort()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient9localPortEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::connected()':
AsyncTCP.cpp:(.text._ZN11AsyncClient9connectedEv+0x0): multiple definition of `AsyncClient::connected()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient9connectedEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::freeable()':
AsyncTCP.cpp:(.text._ZN11AsyncClient8freeableEv+0x0): multiple definition of `AsyncClient::freeable()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient8freeableEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::errorToString(signed char)':
AsyncTCP.cpp:(.text._ZN11AsyncClient13errorToStringEa+0x0): multiple definition of `AsyncClient::errorToString(signed char)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient13errorToStringEa+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncServer::AsyncServer(IPAddress, unsigned short)':
AsyncTCP.cpp:(.text._ZN11AsyncServerC2E9IPAddresst+0x0): multiple definition of `AsyncServer::AsyncServer(IPAddress, unsigned short)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncServerC2E9IPAddresst+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncServer::AsyncServer(IPAddress, unsigned short)':
AsyncTCP.cpp:(.text._ZN11AsyncServerC2E9IPAddresst+0x0): multiple definition of `AsyncServer::AsyncServer(IPAddress, unsigned short)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncServerC2E9IPAddresst+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncServer::AsyncServer(unsigned short)':
AsyncTCP.cpp:(.text._ZN11AsyncServerC2Et+0x0): multiple definition of `AsyncServer::AsyncServer(unsigned short)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncServerC2Et+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncServer::AsyncServer(unsigned short)':
AsyncTCP.cpp:(.text._ZN11AsyncServerC2Et+0x0): multiple definition of `AsyncServer::AsyncServer(unsigned short)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncServerC2Et+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncServer::begin()':
AsyncTCP.cpp:(.text._ZN11AsyncServer5beginEv+0x0): multiple definition of `AsyncServer::begin()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncServer5beginEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncServer::end()':
AsyncTCP.cpp:(.text._ZN11AsyncServer3endEv+0x0): multiple definition of `AsyncServer::end()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncServer3endEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncServer::~AsyncServer()':
AsyncTCP.cpp:(.text._ZN11AsyncServerD2Ev+0x0): multiple definition of `AsyncServer::~AsyncServer()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncServerD2Ev+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncServer::~AsyncServer()':
AsyncTCP.cpp:(.text._ZN11AsyncServerD2Ev+0x0): multiple definition of `AsyncServer::~AsyncServer()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncServerD2Ev+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::_close()':
AsyncTCP.cpp:(.text._ZN11AsyncClient6_closeEv+0x0): multiple definition of `AsyncClient::_close()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient6_closeEv+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::~AsyncClient()':
AsyncTCP.cpp:(.text._ZN11AsyncClientD2Ev+0x0): multiple definition of `AsyncClient::~AsyncClient()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClientD2Ev+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::~AsyncClient()':
AsyncTCP.cpp:(.text._ZN11AsyncClientD2Ev+0x0): multiple definition of `AsyncClient::~AsyncClient()'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClientD2Ev+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::close(bool)':
AsyncTCP.cpp:(.text._ZN11AsyncClient5closeEb+0x0): multiple definition of `AsyncClient::close(bool)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient5closeEb+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::_error(signed char)':
AsyncTCP.cpp:(.text._ZN11AsyncClient6_errorEa+0x0): multiple definition of `AsyncClient::_error(signed char)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient6_errorEa+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::onConnect(std::function<void (void*, AsyncClient*)>, void*)':
AsyncTCP.cpp:(.text._ZN11AsyncClient9onConnectESt8functionIFvPvPS_EES1_+0x0): multiple definition of `AsyncClient::onConnect(std::function<void (void*, AsyncClient*)>, void*)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient9onConnectESt8functionIFvPvPS_EES1_+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::onDisconnect(std::function<void (void*, AsyncClient*)>, void*)':
AsyncTCP.cpp:(.text._ZN11AsyncClient12onDisconnectESt8functionIFvPvPS_EES1_+0x0): multiple definition of `AsyncClient::onDisconnect(std::function<void (void*, AsyncClient*)>, void*)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient12onDisconnectESt8functionIFvPvPS_EES1_+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::onPoll(std::function<void (void*, AsyncClient*)>, void*)':
AsyncTCP.cpp:(.text._ZN11AsyncClient6onPollESt8functionIFvPvPS_EES1_+0x0): multiple definition of `AsyncClient::onPoll(std::function<void (void*, AsyncClient*)>, void*)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient6onPollESt8functionIFvPvPS_EES1_+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncServer::onClient(std::function<void (void*, AsyncClient*)>, void*)':
AsyncTCP.cpp:(.text._ZN11AsyncServer8onClientESt8functionIFvPvP11AsyncClientEES1_+0x0): multiple definition of `AsyncServer::onClient(std::function<void (void*, AsyncClient*)>, void*)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncServer8onClientESt8functionIFvPvP11AsyncClientEES1_+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::onAck(std::function<void (void*, AsyncClient*, unsigned int, unsigned int)>, void*)':
AsyncTCP.cpp:(.text._ZN11AsyncClient5onAckESt8functionIFvPvPS_jjEES1_+0x0): multiple definition of `AsyncClient::onAck(std::function<void (void*, AsyncClient*, unsigned int, unsigned int)>, void*)'   
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient5onAckESt8functionIFvPvPS_jjEES1_+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::onError(std::function<void (void*, AsyncClient*, signed char)>, void*)':
AsyncTCP.cpp:(.text._ZN11AsyncClient7onErrorESt8functionIFvPvPS_aEES1_+0x0): multiple definition of `AsyncClient::onError(std::function<void (void*, AsyncClient*, signed char)>, void*)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient7onErrorESt8functionIFvPvPS_aEES1_+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::onData(std::function<void (void*, AsyncClient*, void*, unsigned int)>, void*)':
AsyncTCP.cpp:(.text._ZN11AsyncClient6onDataESt8functionIFvPvPS_S1_jEES1_+0x0): multiple definition of `AsyncClient::onData(std::function<void (void*, AsyncClient*, void*, unsigned int)>, void*)'      
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient6onDataESt8functionIFvPvPS_S1_jEES1_+0x0): first defined here
.pio\build\esp32dev\lib9da\libAsyncTCP.a(AsyncTCP.cpp.o): In function `AsyncClient::onTimeout(std::function<void (void*, AsyncClient*, unsigned int)>, void*)':
AsyncTCP.cpp:(.text._ZN11AsyncClient9onTimeoutESt8functionIFvPvPS_jEES1_+0x0): multiple definition of `AsyncClient::onTimeout(std::function<void (void*, AsyncClient*, unsigned int)>, void*)'
.pio\build\esp32dev\libe5f\libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient9onTimeoutESt8functionIFvPvPS_jEES1_+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32dev\firmware.elf] Error 1
avillacis commented 3 years ago

Hi, when I try to use both libs im getting errors about redefinition of functions.

This situation is completely expected and deliberate.

This library (AsyncTCPSock) is supposed to be a reimplementation of the AsyncTCP API. As such, it is supposed to define all public methods that were defined by the original AsyncTCP library. The two libraries are not supposed to be used together in the same project. You should choose one of them and delete/move aside the other.

Is the presence of both libraries in the same project accidental? If not, why is it required to attempt use of both libraries at the same time in the same project?

davidkleng commented 3 years ago

Hi, im currently using Plattformio and no, i didn't include both libs, only AsyncTCPSock. Don't know why, but when I compile the code Plattformio downloads both libs and this error pops. Here are the libs im currently using:

board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
extra_scripts = replace_fs.py
board_build.filesystem = littlefs
lib_deps = 
    ;https://github.com/me-no-dev/AsyncTCP
    ;https://github.com/me-no-dev/ESPAsyncWebServer    
    https://github.com/lorol/LITTLEFS

    ;https://github.com/4-20ma/ModbusMaster.git
    https://github.com/adafruit/Adafruit_ADS1X15.git
    https://github.com/adafruit/RTClib.git  
    https://github.com/taranais/NTPClient.git
    https://github.com/PaulStoffregen/OneWire.git
    https://github.com/xreef/PCF8574_library
    https://github.com/yaacov/ArduinoModbusSlave

    https://github.com/yubox-node-org/AsyncTCPSock
    https://github.com/yubox-node-org/ESPAsyncWebServer

I have already tryed deleting the .pio folder and cleaning the project. No mathers what when I try to compile it, plattformio dowloads the lib again.

proddy commented 3 years ago

It's probably because ESPAsyncWebServer has a dependency on that library. When building you'll see the library tree. Try excluding it using lib-ignore https://docs.platformio.org/en/latest/projectconf/section_env_library.html#lib-ignore

davidkleng commented 3 years ago

Thanks, i will try it. I got it to complile manually deleting the redefinitions. But when it did work, it gave me otrher errors like this Issue i posted:

https://github.com/yubox-node-org/ESPAsyncWebServer/issues/3

When you look at the backtrace you can see that is using methods from AsyncTCPSock and AsyncTCP, may that be the problem?

Thanks for your help.

proddy commented 3 years ago

it's just a wrapper, so backwards compatible. Is your project on GitHub?

davidkleng commented 3 years ago

Adding

lib_ignore =
    AsyncTCP

to platformio.ini solved the problem. Thanks.