Hello,
I'm working with a ESP8266-12F via Arduino IDE, the selected board being "Generic ESP8266 module".
I can load and run example sketches "BareMinumum" and "Blink".
When compiling ScanNetworks, I'm getting the errors as in the attachment. From other similar topics I guess the wrong library is used but they cite different directory structure, so I can't figure out how to make ends meet.
Please help.
In file included from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\libraries\WiFi\src/WiFi.h:32:0,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\libraries\WiFi\examples\ScanNetworks\ScanNetworks.ino:19:
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\libraries\WiFi\src/WiFiServer.h:37:14: error: invalid abstract return type for member function 'WiFiClient WiFiServer::available(uint8_t*)'
WiFiClient available(uint8_t* status = NULL);
^
The WiFi library is for use with the official Arduino WiFi shield. You're compiling for an ESP8266, which makes me think that you don't own an official Arduino WiFi shield, since the ESP8266 has built in WiFi capabilities already. The WiFi library will not work with the WiFi functionality of your ESP8266 because the WiFi shield is completely different hardware. For the ESP8266, you need to use the ESP8266WiFi library. You will find example sketches demonstrating the use of that library at File > Examples > ESP8266WiFi. I think you'll be especially interested in File > Examples > ESP8266WiFi > WiFiScan.