Try including `<algorithm>`. If `std::shuffle` still isn't defined then, it might be that mingw hasn't implemented it yet (they lag behind in C++11 support a bit).