Closed davidkleng closed 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?
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.
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
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.
it's just a wrapper, so backwards compatible. Is your project on GitHub?
Adding
lib_ignore =
AsyncTCP
to platformio.ini solved the problem. Thanks.
Hi, when I try to use both libs im getting errors about redefinition of functions. Here is a copy of the console.