[solved]- unknown error in using Wemos d1 for connecting wifi

i tried to run the program for wemos d1 to connect with wifi. However, i am getting this error, and have no idea how to solve it.
i included the URL: http://arduino.esp8266.com/stable/package_esp8266com_index.json in the preference, and selected the board: WeMos D1 R1.

The code i wish to run:

#include <ESP8266WiFi.h>

//SSID of your network
char ssid[] = "myRouter"; //SSID of your Wi-Fi router
char pass[] = "myPassWord"; //Password of your Wi-Fi router

void setup()
{
  Serial.begin(115200);
  delay(10);

  // Connect to Wi-Fi network
  Serial.println();
  Serial.println();
  Serial.print("Connecting to...");
  Serial.println(ssid);

  WiFi.begin(ssid, pass);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("Wi-Fi connected successfully");
}

void loop () {}

The error:

In file included from c:\programdata\matlab\supportpackages\r2017b\3p.instrset\arduinoide.instrset\idepkgs\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\algorithm:60:0,

                 from C:\ProgramData\MATLAB\SupportPackages\R2017b\3P.instrset\arduinoide.instrset\idepkgs\packages\esp8266\hardware\esp8266\2.6.1\cores\esp8266/Arduino.h:237,

                 from sketch\cloud.ino.cpp:1:

c:\programdata\matlab\supportpackages\r2017b\3p.instrset\arduinoide.instrset\idepkgs\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\utility:68:28: fatal error: bits/c++config.h: No such file or directory

 #include <bits/c++config.h>

                            ^

compilation terminated.

exit status 1
Error compiling for board WeMos D1 R1.

https://forum.arduino.cc/index.php?topic=577858

Seems to be a problem with the MATLAB version.

Pieter

I solved this by reinstalled Arduino ide.