Answer the question
In order to leave comments, you need to log in
Why does c std::mutex error occur during makefile gtest?
Here is the error output:
PS C:\Users\79306\Documents\GitHub\2DPrimitiveLib\tests><i> mingw32-make</i>
[ 16%] Building CXX object tests/googletest/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.obj
In file included from C:/Users/79306/Documents/GitHub/2DPrimitiveLib/tests/googletest/googletest/include/gtest/gtest-message.h:55:0,
from C:/Users/79306/Documents/GitHub/2DPrimitiveLib/tests/googletest/googletest/include/gtest/gtest-assertion-result.h:46,
from C:/Users/79306/Documents/GitHub/2DPrimitiveLib/tests/googletest/googletest/include/gtest/gtest.h:59,
from C:\Users\79306\Documents\GitHub\2DPrimitiveLib\tests\googletest\googletest\src\gtest-all.cc:38:
C:/Users/79306/Documents/GitHub/2DPrimitiveLib/tests/googletest/googletest/include/gtest/internal/gtest-port.h:1244:8: error: 'mutex' in namespace 'std' does not name a type
std::mutex mu_;
^~~~~
...
Answer the question
In order to leave comments, you need to log in
C++ compiler retired, or not configured C++ >= C++11
- check if compiler is new (GCC 11 or Clang 12)
- add flag -std=c++17
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question