Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

std::mutex is not available

Open Insomniac80 opened this issue 1 year ago • 2 comments

Basic Infos

  • [X] This issue complies with the issue POLICY doc.
  • [X] I have read the documentation at readthedocs and the issue is not addressed there.
  • [X] I have tested that the issue is present in current master branch (aka latest git).
  • [X] I have searched the issue tracker for a similar issue.
  • [X] If there is a stack dump, I have decoded it.
  • [X] I have filled out all fields below.

Platform

  • Hardware: ESP-12F
  • Core Version: PIO Core 6.1.6
  • Development Env: PlatformIO
  • Operating System: Windows

Settings in IDE

  • Module: WeMos D1 R2 and mini /
  • Flash Mode: dio
  • Flash Size: 4MB
  • lwip Variant: v1.4
  • Reset Method: ck
  • Flash Frequency: [40Mhz]
  • CPU Frequency: 80Mhz
  • Upload Using: SERIAL
  • Upload Speed: 115200

Problem Description

std::mutex is not available. Have set up a Win10 VM and fresh installed VS Code and PIO to ensure it is not related to one of my libraries or such. Still persists.

MCVE Sketch

main.cpp:

#include <Arduino.h>

#include <mutex>

using std::mutex;

void setup() {}

void loop() {}

platformio.ini:

[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino

Output

src\main.cpp:5:12: error: 'mutex' has not been declared in 'std'
    5 | using std::mutex;
      |            ^~~~~
*** [.pio\build\d1_mini\src\main.cpp.o] Error 1

Insomniac80 avatar Mar 07 '23 21:03 Insomniac80