PlatformIO mbed-Fehler beheben: 'Mutex' does not name a type
English
Deutsch
Problem:
Sie versuchen, Ihre PlatformIO-mbed-Anwendung mit Mutexen zu kompilieren, wie
mutex-example.c
Mutex myLock;aber Sie sehen eine Fehlermeldung wie
mutex-error.txt
src\main.cpp:3:1: error: 'Mutex' does not name a type
Mutex myLock;
^~~~~Lösung
Fügen Sie diese Zeile zu Ihrer platformio.ini hinzu:
platformio.ini.snippet
build_flags = -D PIO_FRAMEWORK_MBED_RTOS_PRESENTDies aktiviert die RTOS-Funktionen in mbed, einschließlich des Mutex.
Check out similar posts by category:
Mbed, 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