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.
ErrorReport.txt (26.8 KB)
From olboldie's ErrorrReport.txt:
Arduino: 1.8.9 (Windows Store 18.104.22.168) (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, Enabled, ck, 26 MHz, 40MHz, DOUT (compatible), 4M (3M SPIFFS), 2, v2 Lower Memory, Disabled, CORE, Only Sketch, 115200"
In file included from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_22.214.171.124_x86__mdqgnx93n4wtt\libraries\WiFi\src/WiFi.h:32:0,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_126.96.36.199_x86__mdqgnx93n4wtt\libraries\WiFi\examples\ScanNetworks\ScanNetworks.ino:19:
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_188.8.131.52_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.
I shouldn't have tried this example first of all as it doesn't belong to ESP8266.
The sketch Arduino_WiFi_AVRISP from package esp8266 runs OK.
I was lucky to resolve it myself, thanks pert for the answer nevertheless.