zxrycyan:
Even if I compile for Arduino/Genuino Uno instead of Arduino Uno WiFi board, the same error shows up.
Yes, that's to be expected. You can only use that library with an ESP8266 board. If you want to stick to using your Uno you need to completely forget about using the ESP8266WiFi library, it will never work.
zxrycyan:
Wifi R3 I think.
That's not very clear. Please post a link to where you bought the shield (use the chain links icon on the toolbar to make the link clickable) or a picture of the shield. There are a number of different WiFi shields and you need to use the correct library for your shield.