HTTP server + SoftAP mode example errors

qwertxx
Posts: 3
Joined: Sun May 05, 2019 4:24 pm

HTTP server + SoftAP mode example errors

Postby qwertxx » Thu May 23, 2019 7:33 am

Hello.

I'm new in ESP32 IDF and I'm using ESP IDF Stable v.3.2

I was try compile HTTP server + SoftAP mode example (23_ap_http) from here https://github.com/lucadentella/esp32-tutorial

this one: https://github.com/lucadentella/esp32-t ... 23_ap_http

but I have encountered the errors shown below.

Could You help me find e reason?

Code: Select all

$ make flash -j2
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
Python requirements from C:/msys32/home/Laptop_1/esp/esp-idf/requirements.txt ar e satisfied.
CC build/main/main.o
C:/msys32/home/Laptop_1/esp/esp-idf/dd/23_ap_http/main/main.c: In function 'even t_handler':
C:/msys32/home/Laptop_1/esp/esp-idf/dd/23_ap_http/main/main.c:70:3: error: unkno wn type name 'mdns_server_t'
mdns_server_t* mDNS = NULL;
^
In file included from C:/msys32/home/Laptop_1/esp/esp-idf/components/esp32/inclu de/esp_timer.h:44:0,
from C:/msys32/home/Laptop_1/esp/esp-idf/components/freertos/in clude/freertos/portmacro.h:82,
from C:/msys32/home/Laptop_1/esp/esp-idf/components/freertos/in clude/freertos/portable.h:94,
from C:/msys32/home/Laptop_1/esp/esp-idf/components/freertos/in clude/freertos/FreeRTOS.h:105,
from C:/msys32/home/Laptop_1/esp/esp-idf/dd/23_ap_http/main/mai n.c:3:
C:/msys32/home/Laptop_1/esp/esp-idf/dd/23_ap_http/main/main.c:72:19: error: impl icit declaration of function 'mdns_set_hostname' [-Werror=implicit-function-decl aration]
ESP_ERROR_CHECK(mdns_set_hostname(mDNS, "esp32web"));
^
C:/msys32/home/Laptop_1/esp/esp-idf/components/esp32/include/esp_err.h:117:31: n ote: in definition of macro 'ESP_ERROR_CHECK'
esp_err_t __err_rc = (x); 
^
C:/msys32/home/Laptop_1/esp/esp-idf/dd/23_ap_http/main/main.c:73:19: error: impl icit declaration of function 'mdns_set_instance' [-Werror=implicit-function-decl aration]
ESP_ERROR_CHECK(mdns_set_instance(mDNS, "ESP32 webserver"));
^
C:/msys32/home/Laptop_1/esp/esp-idf/components/esp32/include/esp_err.h:117:31: n ote: in definition of macro 'ESP_ERROR_CHECK'
esp_err_t __err_rc = (x); 
^
C:/msys32/home/Laptop_1/esp/esp-idf/dd/23_ap_http/main/main.c: In function 'http _server_netconn_serve':
C:/msys32/home/Laptop_1/esp/esp-idf/dd/23_ap_http/main/main.c:156:11: warning: u nused variable 'method' [-Wunused-variable]
char* method = strtok(request_line, " ");
^
C:/msys32/home/Laptop_1/esp/esp-idf/dd/23_ap_http/main/main.c:143:9: warning: un used variable 'body' [-Wunused-variable]
char* body = strstr(buf, "\r\n\r\n");
^
cc1.exe: some warnings being treated as errors
make[1]: *** [/home/Laptop_1/esp/esp-idf/make/component_wrapper.mk:286: main.o] Error 1
make: *** [C:/msys32/home/Laptop_1/esp/esp-idf/make/project.mk:530: component-ma in-build] Error 2


Who is online

Users browsing this forum: Baidu [Spider], Tnze__ and 128 guests