Programming in C++ and using esp_wifi
Posted: Tue Feb 28, 2017 11:16 am
Hello Guy,
I'm trying to compile a C++ project in eclipse. Now, I was using the wifi feature and wanted to use the function esp_wifi_set_config(WF_IF_AP, &sta_config). Unfortunately, C++ doesn't support designeted initializers - but all of the configuration Makrus etc. are using constructs like
wifi_config_t sta_config={.sta={.ssid="foo",.password="bar, (...) }};
Of, cause - it is possible to change from C++ to C, but there are Libraries, which are written in C++ (e.g. WS2812b lib).
Do you have any suggestions, how to get this problem solved?
I'm trying to compile a C++ project in eclipse. Now, I was using the wifi feature and wanted to use the function esp_wifi_set_config(WF_IF_AP, &sta_config). Unfortunately, C++ doesn't support designeted initializers - but all of the configuration Makrus etc. are using constructs like
wifi_config_t sta_config={.sta={.ssid="foo",.password="bar, (...) }};
Of, cause - it is possible to change from C++ to C, but there are Libraries, which are written in C++ (e.g. WS2812b lib).
Do you have any suggestions, how to get this problem solved?