<< CMake: Copy files after build | Home | Found my baby, Wood Games 3D >>

Cross-Compiling with mingw: "mingw mutex is not a member of std"

Using spdlog as logger in my current project gives me an error when I try to cross compile it using my urho3d-docker-setup:

error: 'mutex' is not a member of 'std'

After asking the internet I found out that there are actually different mingw-compilers with different suffixes:


Where the upper seems not to work with mutex. (Actually strange, I compiled lots of stuff with Urho3d and its dependencies and I would have guess those would use at some point a mutex!?)

In the end I got everything compiled using the compiler with -posix suffix. (I altered the urho3d's mingw toolchain-file...)

If you want to see all possible "alternatives" of this gcc/g++ command you can do it like this:

update-alternatives --display x86_64-w64-mingw32-g++

And you can choose one in some kind of interactive mode:

update-alternatives --config x86_64-w64-mingw32-g++

You can also set it directly like this:

update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix # posix
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-win32 # win32


Export this post as PDF document  Export this post to PDF document

Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!