如何向 PlatformIO 项目添加编译器标志
要向 PlatformIO 项目添加编译器标志,在 platformio.ini 的构建配置中添加以下行:
platformio_build_flags.cpp
build_flags = -std=gnu++17你也可以使用多行:
platformio_build_flags_multi.cpp
build_flags =
-std=gnu++17
-ffast-math完整 platformio.ini 示例:
platformio.ini
[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino
monitor_speed = 115200
build_flags = -std=gnu++17Check out similar posts by category:
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