MKS1000 WiFi.beginAP() example compile error

Board: Arduino MKS1000 WiFi
Compile fails for example for MKS1000 WiFi.beginAP() at:
WiFi101 (MKS1000) WiFi.beginAP()

beginAP.ino: In function 'void setup()':

beginAP:55: error: 'WL_AP_LISTENING' was not declared in this scope

if (status != WL_AP_LISTENING) {

^

C:\Primary\PROJECTS\Dvinewave\REFERENCE 2016\Arduino WiFi101-MKS1000 examples\beginAP\beginAP.ino: In function 'void loop()':

beginAP:78: error: 'WL_AP_CONNECTED' was not declared in this scope

if (status == WL_AP_CONNECTED) {

^

exit status 1
'WL_AP_LISTENING' was not declared in this scope

Do you mean MKR1000

That's quite an old sketch BTW.
And I get the same error on compile.
But if I use the one from WiF1101 examples it compiles fine so I would suggest you use that one as it seems to have been updated.

Using Win 7 X64 pro and IDE 1.6.11 here.

Those examples compile because they don't call .beginAP() which returns:
-WL_AP_LISTENING when creating access point succeeds
or
-WL_CONNECT_FAILED when creating access point fails
..which are not defined in wifi101.h and so cause the compile error.

I solved it by following the Github wifi101 example AP_SimpleWebServer.ino which I could not find on Arduino’s web site. It now builds.