We are noticing that builds using clang++ don't find std::mutex. Our app doesn't use any CLR, and is a pure C++ command line app/tool. What flags do we need to pass so that these important parts of std aren't blocked. I tried -pthread, but the default thread model is already posix according to the help.
Severity Code Description Project File Line Suppression State
Error GCCDED198 no type named 'mutex' in namespace 'std' Game C:\Foo.h 132
Error GCCDED198 no type named 'condition_variable' in namespace 'std'; did you mean 'OS::ConditionVariable'? Game C:\Foo.h 133
Error G61834E1F no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'? Game C:\Foo.cpp 97
Error G1A4676F8 no member named 'wait' in 'OS::ConditionVariable' Game C:\Foo.cpp 130
Error G1A4676F8 no member named 'notify_one' in 'OS::ConditionVariable' Game C:\Foo.cpp 155
Error G1A4676F8 no member named 'notify_all' in 'OS::ConditionVariable' Game C:\Foo.cpp 104
Error G1A4676F8 no member named 'mutex' in namespace 'std' Game C:\Fooo.cpp 97
This is my setup
PS C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\x64\bin> clang++ --version
clang version 10.0.0
Target: i686-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\bin
PS C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\x64\bin>