During compilation, I've these errors:
Code: Select all
$ make
CXX build/main/wificonn.o
In file included from /home/stefano/Programs/ESP32/.dev-tools/esp-idf/components/esp32/include/esp_timer.h:44:0,
from /home/stefano/Programs/ESP32/.dev-tools/esp-idf/components/freertos/include/freertos/portmacro.h:83,
from /home/stefano/Programs/ESP32/.dev-tools/esp-idf/components/freertos/include/freertos/portable.h:94,
from /home/stefano/Programs/ESP32/.dev-tools/esp-idf/components/freertos/include/freertos/FreeRTOS.h:105,
from /home/stefano/Programs/ESP32/esempi/WiFiConnect/main/./wificonn.h:5,
from /home/stefano/Programs/ESP32/esempi/WiFiConnect/main/./wificonn.cpp:2:
/home/stefano/Programs/ESP32/esempi/WiFiConnect/main/./wificonn.cpp: In constructor 'WIFIConn::WIFIConn(std::__cxx11::string, std::__cxx11::string)':
/home/stefano/Programs/ESP32/esempi/WiFiConnect/main/./wificonn.cpp:21:70: error: invalid use of non-static member function
ESP_ERROR_CHECK(esp_event_loop_init(WIFIConn::event_handler, NULL));
^
/home/stefano/Programs/ESP32/.dev-tools/esp-idf/components/esp32/include/esp_err.h:72:31: note: in definition of macro 'ESP_ERROR_CHECK'
esp_err_t __err_rc = (x); \
^
/home/stefano/Programs/ESP32/esempi/WiFiConnect/main/./wificonn.cpp:37:5: error: name 'ssid' used in a GNU-style designated initializer for an array
};
^
/home/stefano/Programs/ESP32/esempi/WiFiConnect/main/./wificonn.cpp:37:5: error: name 'password' used in a GNU-style designated initializer for an array
/home/stefano/Programs/ESP32/esempi/WiFiConnect/main/./wificonn.cpp:34:34: error: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
.ssid = WIFI_SSID.c_str(),
^
/home/stefano/Programs/ESP32/esempi/WiFiConnect/main/./wificonn.cpp:35:38: error: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
.password = WIFI_PASS.c_str(),
^
/home/stefano/Programs/ESP32/esempi/WiFiConnect/main/./wificonn.cpp:37:5: warning: missing initializer for member 'wifi_sta_config_t::password' [-Wmissing-field-initializers]
};
^
/home/stefano/Programs/ESP32/esempi/WiFiConnect/main/./wificonn.cpp:37:5: warning: missing initializer for member 'wifi_sta_config_t::scan_method' [-Wmissing-field-initializers]
/home/stefano/Programs/ESP32/esempi/WiFiConnect/main/./wificonn.cpp:37:5: warning: missing initializer for member 'wifi_sta_config_t::bssid_set' [-Wmissing-field-initializers]
/home/stefano/Programs/ESP32/esempi/WiFiConnect/main/./wificonn.cpp:37:5: warning: missing initializer for member 'wifi_sta_config_t::bssid' [-Wmissing-field-initializers]
/home/stefano/Programs/ESP32/esempi/WiFiConnect/main/./wificonn.cpp:37:5: warning: missing initializer for member 'wifi_sta_config_t::channel' [-Wmissing-field-initializers]
/home/stefano/Programs/ESP32/esempi/WiFiConnect/main/./wificonn.cpp:37:5: warning: missing initializer for member 'wifi_sta_config_t::sort_method' [-Wmissing-field-initializers]
/home/stefano/Programs/ESP32/esempi/WiFiConnect/main/./wificonn.cpp:37:5: warning: missing initializer for member 'wifi_sta_config_t::threshold' [-Wmissing-field-initializers]
/home/stefano/Programs/ESP32/.dev-tools/esp-idf/make/component_wrapper.mk:273: set di istruzioni per l'obiettivo "wificonn.o" non riuscito
make[1]: *** [wificonn.o] Errore 1
/home/stefano/Programs/ESP32/.dev-tools/esp-idf/make/project.mk:450: set di istruzioni per l'obiettivo "component-main-build" non riuscito
make: *** [component-main-build] Errore 2
Code: Select all
// configure the wifi connection and start the interface
wifi_config_t wifi_config=
{
.sta=
{
.ssid = WIFI_SSID.c_str(),
.password = WIFI_PASS.c_str(),
},
};
Can you help me?
Thanks.
Regards.
Stefano