Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

23_ap_http example: Make errors at IDF Stable version 3.2 #14

Open
dondu opened this issue May 19, 2019 · 1 comment
Open

23_ap_http example: Make errors at IDF Stable version 3.2 #14

dondu opened this issue May 19, 2019 · 1 comment

Comments

@dondu
Copy link

dondu commented May 19, 2019

Hello.

I'm using Your example 23_ap_http (HTTP server + SoftAP mode) and tries to run it on ESP-WROOM-32, but when i compiles it using IDF Stable 3.2 there were some errors and warnings:

$ 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

Regards,
Jacek

@afugs98
Copy link

afugs98 commented Jul 16, 2019

See Pull Request #8 for the fix.

His example was for the BLE example, but replacing the same lines worked for me!
Good luck :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants