You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I combine esphttpclient into epshttpd. When compile show error:
CC httpclient.c
httpclient.c: In function 'esp_strdup':
httpclient.c:45:2: error: implicit declaration of function 'pvPortMalloc' [-Werror=implicit-function-declaration]
char * new_str = (char *)os_malloc(os_strlen(str) + 1); // 1 for null character
^
httpclient.c:45:2: error: implicit declaration of function 'ets_strlen' [-Werror=implicit-function-declaration]
httpclient.c:47:3: error: implicit declaration of function 'os_printf_plus' [-Werror=implicit-function-declaration]
os_printf("esp_strdup: malloc error");
^
httpclient.c:50:2: error: implicit declaration of function 'ets_strcpy' [-Werror=implicit-function-declaration]
os_strcpy(new_str, str);
^
httpclient.c: In function 'receive_callback':
httpclient.c:76:2: error: implicit declaration of function 'ets_memcpy' [-Werror=implicit-function-declaration]
os_memcpy(new_buffer, req->buffer, req->buffer_size);
^
httpclient.c:80:2: error: implicit declaration of function 'vPortFree' [-Werror=implicit-function-declaration]
os_free(req->buffer);
^
httpclient.c: In function 'connect_callback':
httpclient.c:119:3: error: implicit declaration of function 'ets_sprintf' [-Werror=implicit-function-declaration]
os_sprintf(post_headers, "Content-Length: %d\r\n", strlen(req->post_data));
^
httpclient.c: In function 'disconnect_callback':
httpclient.c:166:4: error: implicit declaration of function 'ets_strncmp' [-Werror=implicit-function-declaration]
if (os_strncmp(req->buffer, version, strlen(version)) != 0) {
^
httpclient.c:170:5: error: implicit declaration of function 'atoi' [-Werror=implicit-function-declaration]
http_status = atoi(req->buffer + strlen(version));
^
httpclient.c:171:5: error: implicit declaration of function 'ets_strstr' [-Werror=implicit-function-declaration]
body = (char *)os_strstr(req->buffer, "\r\n\r\n") + 4;
^
Can you fix help me. Thanks
The text was updated successfully, but these errors were encountered:
Download espmissingincludes.h to your include folder and #include it user_main.c (or another appropriate place)
I think the errors you are getting is because many of the SDK functions don't have a declaration (Espressif "forgot" to provide them) and because you are compiling with -Werror
(all warnings are treated as errors)
Hi
Thankyou for your project
I combine esphttpclient into epshttpd. When compile show error:
CC httpclient.c
httpclient.c: In function 'esp_strdup':
httpclient.c:45:2: error: implicit declaration of function 'pvPortMalloc' [-Werror=implicit-function-declaration]
char * new_str = (char *)os_malloc(os_strlen(str) + 1); // 1 for null character
^
httpclient.c:45:2: error: implicit declaration of function 'ets_strlen' [-Werror=implicit-function-declaration]
httpclient.c:47:3: error: implicit declaration of function 'os_printf_plus' [-Werror=implicit-function-declaration]
os_printf("esp_strdup: malloc error");
^
httpclient.c:50:2: error: implicit declaration of function 'ets_strcpy' [-Werror=implicit-function-declaration]
os_strcpy(new_str, str);
^
httpclient.c: In function 'receive_callback':
httpclient.c:76:2: error: implicit declaration of function 'ets_memcpy' [-Werror=implicit-function-declaration]
os_memcpy(new_buffer, req->buffer, req->buffer_size);
^
httpclient.c:80:2: error: implicit declaration of function 'vPortFree' [-Werror=implicit-function-declaration]
os_free(req->buffer);
^
httpclient.c: In function 'connect_callback':
httpclient.c:119:3: error: implicit declaration of function 'ets_sprintf' [-Werror=implicit-function-declaration]
os_sprintf(post_headers, "Content-Length: %d\r\n", strlen(req->post_data));
^
httpclient.c: In function 'disconnect_callback':
httpclient.c:166:4: error: implicit declaration of function 'ets_strncmp' [-Werror=implicit-function-declaration]
if (os_strncmp(req->buffer, version, strlen(version)) != 0) {
^
httpclient.c:170:5: error: implicit declaration of function 'atoi' [-Werror=implicit-function-declaration]
http_status = atoi(req->buffer + strlen(version));
^
httpclient.c:171:5: error: implicit declaration of function 'ets_strstr' [-Werror=implicit-function-declaration]
body = (char *)os_strstr(req->buffer, "\r\n\r\n") + 4;
^
Can you fix help me. Thanks
The text was updated successfully, but these errors were encountered: