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 am trying to compile iothub_client_sample_mqtt example. I have cloned esp-idf repo and this repo. but while building the code (idf.py build), I am getting the following error:
tlsio_esp_tls.c:127:5: error: implicit declaration of function 'esp_tls_conn_delete'; did you mean 'esp_tls_conn_write'? [-Werror=implicit-function-declaration] 127 | esp_tls_conn_delete(tls_io_instance->esp_tls_handle);
How can I fix this error ?
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
error: implicit declaration of function 'esp_tls_conn_delete'
error: implicit declaration of function 'esp_tls_conn_delete' (CA-319)
Nov 2, 2023
I fixed that. But I am getting another error. tlsio_esp_tls.c:219:59: error: invalid application of 'sizeof' to incomplete type 'esp_tls_t' {aka 'struct esp_tls'} 219 | result->esp_tls_handle = calloc(1, sizeof(esp_tls_t)); | ^~~~~~~~~ [14/84] Building C object esp-idf/port...iot-sdk-c/c-utility/src/sastoken.c.obj ninja: build stopped: subcommand failed.
@anoopkumares
Just try to allocate fixed memory, in my case seems that 2*1024 works as expected.
// result->esp_tls_handle = (esp_tls_t*)calloc(1, sizeof(esp_tls_t));
//ToDo: esp-idf v5.1.1 compilation problem of un-complete type sizeof(esp_tls_t), below is a workaround
result->esp_tls_handle = (esp_tls_t*)calloc(1, 2*1024);
I am trying to compile iothub_client_sample_mqtt example. I have cloned esp-idf repo and this repo. but while building the code (idf.py build), I am getting the following error:
tlsio_esp_tls.c:127:5: error: implicit declaration of function 'esp_tls_conn_delete'; did you mean 'esp_tls_conn_write'? [-Werror=implicit-function-declaration] 127 | esp_tls_conn_delete(tls_io_instance->esp_tls_handle);
How can I fix this error ?
The text was updated successfully, but these errors were encountered: