Arduino / ESP8266:错误:'Pchr不允许使用节属性

时间:2019-05-31 20:43:59

标签: c++ arduino esp8266 arduino-esp8266

我的Arduino程序已经编译并且可以正常工作,但是发生了某些事情,或者我做了一些事情,因为现在当我编译它时,我遇到了编译器错误。我尝试将esp8266 v2.4.1升级到2.5.2,但随后在random.tcc头文件中遇到另一个错误。我正在使用带有Visual Micro的Visual Studio 2017编译我的代码。我在网上看到了此错误,但升级似乎无济于事。

有什么建议吗?

输出

Adafruit_ESP8266.cpp:17: In file included from

Adafruit_ESP8266.h: 28:35: error: section attribute not allowed for 'Pchr
   typedef const PROGMEM char        Pchr; \\ Ditto, kindasorta

来源

#include <Adafruit_ESP8266.h>

#include <ESP8266WiFi.h>          //https://github.com/esp8266/Arduino

//needed for library
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>         //https://github.com/tzapu/WiFiManager


// the setup function runs once when you press reset or power the board
void setup()
{
    Serial.println("Begin Setup");


    Serial.println("End Setup");
}

// the loop function runs over and over again until power down or reset
void loop()
{
    Serial.println("Begin Loop");


    Serial.println("End Loop");
}

1 个答案:

答案 0 :(得分:0)

我通过删除头文件Adafruit_ESP8266.h解决了我的错误。我必须点击包含它的东西。