Problems with kolban's cpp_utils WiFi.h
Posted: Mon Jan 08, 2018 5:02 pm
Hi. I am trying to use C++ and C on the ESP32.
-> kolban's CPP Utils (https://github.com/nkolban/esp32-snippe ... /cpp_utils)
My code is simple, i used the snippet in kolban's book and i followed the readme.md (i followed instructions) :
But i get these errors while issuing command "make" :
In function 'void app_main()':
/main/main.cpp:14:4: error: 'pWiFi' was not declared in this scope
pWiFi->connectAP("s7-oles", "esp32-12345678");
/main/main.cpp:12:10: warning: unused variable 'pWifi' [-Wunused-variable]
WiFi *pWifi = new WiFi();
what is the problem?
-> kolban's CPP Utils (https://github.com/nkolban/esp32-snippe ... /cpp_utils)
My code is simple, i used the snippet in kolban's book and i followed the readme.md (i followed instructions) :
Code: Select all
#include "WiFi.h"
extern "C" {
void app_main();
}
void app_main() {
// Your code goes here
WiFi *pWifi = new WiFi();
pWiFi->connectAP("SSID", "PASSWORD");
}
In function 'void app_main()':
/main/main.cpp:14:4: error: 'pWiFi' was not declared in this scope
pWiFi->connectAP("s7-oles", "esp32-12345678");
/main/main.cpp:12:10: warning: unused variable 'pWifi' [-Wunused-variable]
WiFi *pWifi = new WiFi();
what is the problem?