Closed ttimpe closed 2 years ago
Hi,
Make sure to install the correct Base64 library as there are several. Personally I use PlatformIO and for that IDEI have included a config file which points to the correct library dependency (lib_deps = agdl/Base64@^1.0.0
) for an out-of-the-box experience.
However, this doesn't help you now, try searching for "Arturo Guadalupi's" Base64 library in the Arduino Library Manager. Secondly I will probably try to offer a compile time switch to disable this dependendency and the features coming with it.
@ttimpe @QuickSander I had a similar issue compiling for an ESP32. Turns out the Arduino core for the ESP32 already has a base64 implementation which seems to conflict with Arturo Guadalupi's Base64 library.
Replacing:
#include <Base64.h>
with
#include <base64.h>
and
const int encodedLength = Base64.encodedLength(combinedInput.length());
char encodedString[encodedLength+1]; // Base64 makes sure _encodedString_ is zero terminated.
Base64.encode(encodedString, const_cast<char*>(combinedInput.cStr()), combinedInput.length());`
with
char* encodedString = base64::encode(combinedInput.cStr());
built fine. Although i'm yet to test the authenticate
function.
Hello,
I am building a fan controller script using an Arduino Uno WiFi Rev2 but I always an error regarding a missing Base64 library not being included in ArduinoHttpServer:
StreamHttpRequest.hpp:403:30: error: 'Base64' was not declared in this scope
This happens on both the Web editor and the regular Arduino IDE. I've already tried manually including Base64 in the top of my script.
This is my script:
I assume this is an issue in the ArduinoHttpServer since the error mentions Base64 not being included inside it.