Solved Can't find std::shared_mutex
-
std::shared_mutex
was added with the c++ 17 standard, but it does not seem to be available when I#include <shared_mutex>
. I've configured my .pro file to useCONFIG += c++20
, but the standard library appears to only be from c++ 14. How would I be able to link against a later standard library? -
@kitfox I think you have to change
CONFIG += c++20
toCONFIG += c++17
, AFAIK CONFIG += c++20 do not exist ==> https://doc.qt.io/qt-5/qmake-variable-reference.html#configOr maybe use
CONFIG += c++latest
-
@kitfox You forgot to mention the compiler (including exact version) you're using.
-
How would I check that?
-
-
This is what my kit screens look like. How do I tell what compiler will link against c++17? I tried switching to Qt 5.14.1, but that still doesn't have it.
-
@kitfox I think you have to change
CONFIG += c++20
toCONFIG += c++17
, AFAIK CONFIG += c++20 do not exist ==> https://doc.qt.io/qt-5/qmake-variable-reference.html#configOr maybe use
CONFIG += c++latest
-
That worked. Thanks.