如何修复 ESP32 PlatformIO esp_https_server.h: No such file or directory
问题:
编译你的 PlatformIO 项目时,你看到类似这样的编译器错误
src/main.cpp:6:10: fatal error: esp_https_server.h: No such file or directory
esp_https_server_missing.txt
src/main.cpp:6:10: fatal error: esp_https_server.h: No such file or directory在以下行:
include_esp_https_server.txt
#include <esp_https_server.h>解决方案
ESP32 HTTPS 服务器库不包含在旧版本的 arduino-espressif32 中。因此解决方案是使用更新版本的平台库,如版本 2.0.4。为此,将以下行添加到你的 platformio.ini:
platformio_platform_packages.ini
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.4完整 platformio.ini 示例:
platformio.ini
[env:esp32dev]
platform = espressif32
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.4
board = esp32dev
framework = arduino
monitor_speed = 115200Check out similar posts by category:
Embedded, ESP8266/ESP32, PlatformIO
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow