Using the library as part of a project that requires the ssl library from the sdk fails. Compilation works fine but linking fails with the following error message:
C:/Espressif/ESP8266_SDK/lib\libssl.a(ssl_crypto_misc.o): In function base64_decode': (.irom0.text+0x120): multiple definition ofbase64_decode'
libesphttpd\libesphttpd.a(base64.o):c:\Users..........\libesphttpd/core/base64.c:45: first defined here
collect2.exe: error: ld returned 1 exit status
As an interim fix I added the following to the makefile:
ifeq ("$(USE_SSL_LIB)","yes")
CFLAGS += -DUSE_SSL_LIB
endif
and then surrounded the entire content of base64.c with
ifndef USE_SSL_LIB
.....
endif
No idea if there is a more elegant way to detect this. Changing the name of the functions would be an option but would likely waste precious space having code for the same purpose twice in the firmware.
Using the library as part of a project that requires the ssl library from the sdk fails. Compilation works fine but linking fails with the following error message:
C:/Espressif/ESP8266_SDK/lib\libssl.a(ssl_crypto_misc.o): In function
base64_decode': (.irom0.text+0x120): multiple definition of
base64_decode' libesphttpd\libesphttpd.a(base64.o):c:\Users..........\libesphttpd/core/base64.c:45: first defined here collect2.exe: error: ld returned 1 exit statusAs an interim fix I added the following to the makefile: ifeq ("$(USE_SSL_LIB)","yes") CFLAGS += -DUSE_SSL_LIB endif
and then surrounded the entire content of base64.c with
ifndef USE_SSL_LIB
.....
endif
No idea if there is a more elegant way to detect this. Changing the name of the functions would be an option but would likely waste precious space having code for the same purpose twice in the firmware.