ArduinoMongoose
ArduinoMongoose copied to clipboard
Linking area
trafficstars
I'm using release 20 on platform IO and trying to build the simple web server (https version) and the compile stage works fine but I get linking errors as follows
/Users/user1/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/src/main.cpp.o:(.literal._Z5setupv+0x88): undefined reference to `MongooseHttpServer::begin(unsigned short, char const*, char const*)'
/Users/user1/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/src/main.cpp.o: in function `setup()':
/Users/user1/Documents/PlatformIO/Projects/simple mongoose server/src/main.cpp:111: undefined reference to `MongooseHttpServer::begin(unsigned short, char const*, char const*)'
Any input? maybe a platformio bug?
I think I know what's up. I added -DMG_ENABLE_SSL in the platform.io and got the following error which I assume means my version is too new and doesn't use the older openssl. Seems espressif has moved on to their own version of TLS and breaks things.
Compiling .pio/build/esp32dev/lib83a/ArduinoMongoose/arduino.c.o
Archiving .pio/build/esp32dev/libb9b/libWiFi.a
Indexing .pio/build/esp32dev/libb9b/libWiFi.a
Compiling .pio/build/esp32dev/lib83a/ArduinoMongoose/mongoose.c.o
Archiving .pio/build/esp32dev/libaca/libEthernet.a
Indexing .pio/build/esp32dev/libaca/libEthernet.a
In file included from .pio/libdeps/esp32dev/ArduinoMongoose/src/mongoose.c:4661:
/Users/user1/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/openssl/include/openssl/ssl.h:8:2: warning: #warning "OpenSSL component will be removed from ESP-IDF in v5.0, please use esp_tls instead" [-Wcpp]
#warning "OpenSSL component will be removed from ESP-IDF in v5.0, please use esp_tls instead"
^~~~~~~
.pio/libdeps/esp32dev/ArduinoMongoose/src/mongoose.c:4663:10: fatal error: openssl/tls1.h: No such file or directory
#include <openssl/tls1.h>
^~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio/build/esp32dev/FrameworkArduino/Esp.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/FirmwareMSC.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/FunctionalInterrupt.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/HWCDC.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/HardwareSerial.cpp.o