I'm using 'mingw-w64-build-r25' from
https://files.1f0.de/mingw/scripts/ (does anyone know who actually maintains these updated scripts? Hendrik / nevairiel?) to create my own toolchain with GCC 8.2,
MinGW-w64 6.0.0 and pthreads 2.9.1.
Today I tried to compile
libdmusic, but I got the following error:
Code:
[ 11%] Building CXX object CMakeFiles/dmusic.dir/src/DlsPlayer.cpp.obj
In file included from /[...]/libdmusic_git/include/dmusic/DlsPlayer.h:8,
from /[...]/libdmusic_git/src/DlsPlayer.cpp:1:
/[...]/libdmusic_git/include/dmusic/PlayingContext.h:74:14: error: 'mutex' in namespace 'std' does not name a type
std::mutex m_queueMutex;
^~~~~
I've done some searching and read that
std::mutex and
std::thread are added in C++11, which requires a recent GCC version and most likely the
-std=gnu++11 compiler flag as well.
I'm using the latest GCC, but
export CXXFLAGS="-std=gnu++11" didn't make any difference. I still get the error.
Now I wonder, is
this guy right, despite having the latest GCC? Or is there a flaw in the MinGW-w64 build script that I'm getting this error?