thank You for Your hint on the defines:
and the longcalls switch-DESP_PLATFORM=1 -DMG_ENABLE_HTTP=1 -DMG_ENABLE_FILESYSTEM=1
--> You diserve a beer!-mlongcalls
I make a Makefile.projbuild as You suggested. But it did not work - maybe because I am working with Eclipse? In Eclipse I modified the compiler invoacation in order to include the above mentioned switches. The compiler line now is:
Code: Select all
xtensa-esp32-elf-gcc -std=gnu99 -Og -ggdb -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-old-style-declaration -DWITH_POSIX -mlongcalls -DESP_PLATFORM=1 -DMG_ENABLE_HTTP=1 -DMG_ENABLE_FILESYSTEM=1 -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H -DESP_PLATFORM -D IDF_VER=\"v2.0-rc1-1314-g9314bf0d-dirty\" -MMD -MP ...
Code: Select all
E:/msys32/opt/devel/nk_wifi/main/mgWebserver.cpp:99: undefined reference to `mg_http_serve_file'
E:/msys32/opt/devel/nk_wifi/main/mgWebserver.cpp:101: undefined reference to `mg_serve_http'
Regards
Edit: Now the problem is solved: I cleaned the project in eclipse and made a complete build.