(SOLVED) Atmel Studio and Visual Micro WString Compile error...

Hello all,

I have a problem as i wrote in the subject. Here is my sample code;

#include <Arduino.h>

int s = 0;
String str;

void setup()
{  
  Serial.begin(9600);  
}

void loop()
{
  str = "Count";
  Serial.print(str);
  Serial.print(": ");
  Serial.println(s);
  s++;
  delay(1000);
}

When i compile this code with Arduino IDE 1.6.3 there is no problem. But when i compile the same code with Atmel Studio & Visual Micro i am getting these errors;

Compiling ‘Temp1’ for ‘Arduino Uno’
WString.cpp:In member function ‘String& String::copy(const __FlashStringHelper*, unsigned int)’
WString.cpp:189:26: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
WString.cpp:189:26: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
WString.cpp:189:20: error: expected primary-expression before ‘const’
WString.cpp:189:20: error: expected ‘)’ before ‘const’
WString.cpp:In member function ‘String& String::operator=(const __FlashStringHelper*)’
WString.cpp:249:39: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
WString.cpp:249:39: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
WString.cpp:249:33: error: expected primary-expression before ‘const’
WString.cpp:249:33: error: expected ‘)’ before ‘const’
Error compiling core

The problem is about String declaration. If i don’t use String type variable there is no problem and code running without any problem.

Best Regards…(SOLVED)

Problem solved with Arduino IDE 1.5.5 r2. If i use any higher version IDE from 1.6.0 to 1.6.4 getting same error.