点灯科技库是不是没有适配PlatformIO?-Arduino中文社区 - Powered by Discuz! Archiver

TinyHugh 发表于 2022-9-21 18:38

点灯科技库是不是没有适配PlatformIO?

本帖最后由 TinyHugh 于 2022-9-21 18:39 编辑

在arduino上编译正常,在PlatformIO上编译就报错。错误太多,就复制了一部分。求助各位大佬,是我设置问题吗?

Processing esp01_1m (platform: espressif8266; board: esp01_1m; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp01_1m.html
PLATFORM: Espressif 8266 (4.0.1) > Espressif Generic ESP8266 ESP-01 1M
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
PACKAGES:
- framework-arduinoespressif8266 @ 3.30002.0 (3.0.2)
- tool-esptool @ 1.413.0 (4.13)
- tool-esptoolpy @ 1.30000.201119 (3.0.0)
- toolchain-xtensa @ 2.100300.210717 (10.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 37 compatible libraries
Scanning dependencies...
Dependency Graph
|-- PubSubClient @ 2.8.0
|-- Blinker @ 0.1.5
|   |-- Hash @ 1.0
|   |-- ESP8266mDNS @ 1.2
|   |   |-- ESP8266WiFi @ 1.0   
|   |-- ESP8266WebServer @ 1.0   
|   |   |-- ESP8266WiFi @ 1.0   
|   |-- ESP8266WiFi @ 1.0
|   |-- ESP8266HTTPClient @ 1.2   
|   |   |-- ESP8266WiFi @ 1.0   
|   |-- EspSoftwareSerial @ 6.12.7
|   |-- EEPROM @ 1.0
|   |-- Ticker @ 1.0
|   |-- Ethernet @ 2.0.0
|   |   |-- SPI @ 1.0
|   |-- SPI @ 1.0
|-- EEPROM @ 1.0
|-- ESP8266WiFi @ 1.0
Building in release mode
Compiling .pio\build\esp01_1m\src\main.cpp.o
Compiling .pio\build\esp01_1m\lib147\Blinker\modules\WebSockets\WebSocketsClient.cpp.o
In file included from .pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerProtocol.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/Adapters/BlinkerArduinoWS.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/BlinkerSimpleESP8266_WS.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/Blinker.h:15,
               from src\main.cpp:9:
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h:1972:29: warning: multi-line comment [-Wcomment]
1972 |                           //+ \ _msg + \
      |                           ^
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h:2062:13: warning: multi-line comment [-Wcomment]
2062 |             // String data = "{\"authKey\":\"" + STRING_format(static_cast<Proto*>(this)->_deviceName) + \
      |             ^
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h:2067:13: warning: multi-line comment [-Wcomment]
2067 |             // String data = "{\"deviceName\":\"" + macDeviceName() + \
      |             ^
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h:2087:13: warning: multi-line comment [-Wcomment]
2087 |             // String data = "{\"authKey\":\"" + STRING_format(static_cast<Proto*>(this)->_deviceName) + \
      |             ^
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h:2092:13: warning: multi-line comment [-Wcomment]
2092 |             // String data = "{\"deviceName\":\"" + macDeviceName() + \
      |             ^
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h:4073:13: warning: multi-line comment [-Wcomment]
4073 |             // const char* ca = \
      |             ^
In file included from .pio\libdeps\esp01_1m\Blinker\src/Adapters/BlinkerArduinoWS.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/BlinkerSimpleESP8266_WS.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/Blinker.h:15,
               from src\main.cpp:9:
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerProtocol.h:781:26: warning: invalid suffix on literal; C++11 requires a spween literal and string macro [-Wliteral-suffix]
781 |             BLINKER_LOG1("\nBlinker v"BLINKER_VERSION"\n"
      |                        ^
.pio\libdeps\esp01_1m\Blinker\src\modules\WebSockets\WebSocketsClient.cpp: In member function 'virtual void WebSocketsClienageReceived(WSclient_t*, WSopcode_t, uint8_t*, size_t, bool)':
.pio\libdeps\esp01_1m\Blinker\src\modules\WebSockets\WebSocketsClient.cpp:321:11: warning: enumeration value 'WSop_close' nled in switch [-Wswitch]
321 |   switch(opcode) {
      |         ^
.pio\libdeps\esp01_1m\Blinker\src\modules\WebSockets\WebSocketsClient.cpp:321:11: warning: enumeration value 'WSop_ping' noed in switch [-Wswitch]
.pio\libdeps\esp01_1m\Blinker\src\modules\WebSockets\WebSocketsClient.cpp:321:11: warning: enumeration value 'WSop_pong' noed in switch [-Wswitch]
.pio\libdeps\esp01_1m\Blinker\src\modules\WebSockets\WebSocketsClient.cpp: In member function 'void WebSocketsClient::conne)':
.pio\libdeps\esp01_1m\Blinker\src\modules\WebSockets\WebSocketsClient.cpp:693:26: error: 'class BearSSL::WiFiClientSecure'
member named 'verify'
693 |         if(!_client.ssl->verify(_fingerprint.c_str(), _host.c_str())) {
      |                        ^~~~~~
*** [.pio\build\esp01_1m\lib147\Blinker\modules\WebSockets\WebSocketsClient.cpp.o] Error 1
In file included from .pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerProtocol.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/Adapters/BlinkerArduinoWS.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/BlinkerSimpleESP8266_WS.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/Blinker.h:15,
               from src\main.cpp:9:
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h: In constructor 'BlinkerButton::BlinkerButton()':
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h:96:26: warning: passing NULL to non-pointer argument 1 of 'String::Snt, unsigned char)' [-Wconversion-null]
   96 |             : buttonName(NULL), buttonState(false)
      |                        ^~~~
In file included from C:\Users\TinyHugh\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Arduino.h:286,
               from src\main.cpp:3:
C:\Users\TinyHugh\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/WString.h:68:25: note:   declared here
   68 |         explicit String(int, unsigned char base = 10);
      |                         ^~~
In file included from .pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerProtocol.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/Adapters/BlinkerArduinoWS.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/BlinkerSimpleESP8266_WS.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/Blinker.h:15,
               from src\main.cpp:9:
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h: In constructor 'BlinkerSlider::BlinkerSlider()':
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h:116:26: warning: passing NULL to non-pointer argument 1 of 'String::int, unsigned char)' [-Wconversion-null]
116 |             : sliderName(NULL), sliderValue(0)
      |                        ^~~~
In file included from C:\Users\TinyHugh\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Arduino.h:286,
               from src\main.cpp:3:
C:\Users\TinyHugh\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/WString.h:68:25: note:   declared here
   68 |         explicit String(int, unsigned char base = 10);
      |                         ^~~
In file included from .pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerProtocol.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/Adapters/BlinkerArduinoWS.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/BlinkerSimpleESP8266_WS.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/Blinker.h:15,
               from src\main.cpp:9:
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h: In constructor 'BlinkerToggle::BlinkerToggle()':
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h:134:26: warning: passing NULL to non-pointer argument 1 of 'String::int, unsigned char)' [-Wconversion-null]
134 |             : toggleName(NULL), toggleState(false)
      |                        ^~~~
In file included from C:\Users\TinyHugh\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Arduino.h:286,
               from src\main.cpp:3:
C:\Users\TinyHugh\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/WString.h:68:25: note:   declared here
   68 |         explicit String(int, unsigned char base = 10);
      |                         ^~~
In file included from .pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerProtocol.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/Adapters/BlinkerArduinoWS.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/BlinkerSimpleESP8266_WS.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/Blinker.h:15,
               from src\main.cpp:9:
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h: In constructor 'BlinkerRGB::BlinkerRGB()':
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h:152:23: warning: passing NULL to non-pointer argument 1 of 'String::int, unsigned char)' [-Wconversion-null]
152 |             : rgbName(NULL)
      |                     ^~~~
In file included from C:\Users\TinyHugh\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Arduino.h:286,
               from src\main.cpp:3:
C:\Users\TinyHugh\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/WString.h:68:25: note:   declared here
   68 |         explicit String(int, unsigned char base = 10);
      |                         ^~~
In file included from .pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerProtocol.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/Adapters/BlinkerArduinoWS.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/BlinkerSimpleESP8266_WS.h:4,
               from .pio\libdeps\esp01_1m\Blinker\src/Blinker.h:15,
               from src\main.cpp:9:
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h: In function 'void _tm_callback()':
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h:1241:30: warning: comparison of integer expressions of different sig: 'uint32_t' {aka 'unsigned int'} and 'int32_t' {aka 'int'} [-Wsign-compare]
1241 |               if (_tmTime1 >= nowTime) {
      |                     ~~~~~~~~~^~~~~~~~~~
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h:1247:35: warning: comparison of integer expressions of different sig: 'uint32_t' {aka 'unsigned int'} and 'int32_t' {aka 'int'} [-Wsign-compare]
1247 |               else if (_tmTime2 <= nowTime && _tmTime1 < nowTime) {
      |                        ~~~~~~~~~^~~~~~~~~~
.pio\libdeps\esp01_1m\Blinker\src/Blinker/BlinkerApi.h:1247:58: warning: comparison of integer expressions of different sig: 'uint32_t' {aka 'unsigned int'} and 'int32_t' {aka 'int'} [-Wsign-compare]
1247 |               else if (_tmTime2 <= nowTime && _tmTime1 < nowTime) {
      |                                                 ~~~~~~~~~^~~~~~~~~


ZJM001 发表于 2022-9-21 19:06

warning不用管了

点灯官方 发表于 2022-9-21 19:21

据使用pio的用户反馈,blinker lib可以直接在pio中使用,不需要特殊适配。
从报错看,可能是你使用的esp package版本过低造成的。

TinyHugh 发表于 2022-9-22 12:25

点灯官方 发表于 2022-9-21 19:21
据使用pio的用户反馈,blinker lib可以直接在pio中使用,不需要特殊适配。
从报错看,可能是你使用的esp pa ...

是这个版本吗?这个已经是最新的了。

TinyHugh 发表于 2022-9-22 12:27

ZJM001 发表于 2022-9-21 19:06
warning不用管了

警告很多,还有不少错误,不能编译。
页: [1]
查看完整版本: 点灯科技库是不是没有适配PlatformIO?