Qt 6.2.2 experimental/filesystem => filesystem
-
According to the supported platforms page you need at least gcc 9.
-
@Christian-Ehrlicher I know....GCC9 is installed. Somehow qmake still does not find it.
-
@AxelVienna said in Qt 6.2.2 experimental/filesystem => filesystem:
/usr/include/c++
if you still have experimental-prefix of std::filesystem, gcc/g++ version is not right.
check the version of g++: g++ --versionGCC 8
Runtime Library (libstdc++)
Improved experimental support for C++17, including the following features:
Deduction guides to support class template argument deduction.
std::filesystem implementation.
std::char_traits<char> and std::char_traits<wchar_t> are usable in constant expressions.
std::to_chars and std::from_chars (for integers only, not for floating point types).you may purge gcc/g++ 7 from your computer and reinstall gcc/g++ 9
-
Either uninstall gcc 7 or set the CC and CXX environment variables appropriately.
-
If you want to keep the older gcc versions for some reason, you can update which version /usr/bin/g++ points to with 'update-alternatives'. This page is for Ubuntu, but I think it works OpenSuse as well (Steps 2-4), https://linuxconfig.org/how-to-switch-between-multiple-gcc-and-g-compiler-versions-on-ubuntu-20-04-lts-focal-fossa
-
Thanks all. The problem is: Qt Creator recognizes compilers of different versions (7 and 9). When configuring the kits, however, it always refers to
/usr/bin/g++
. There is a combobox where one could theoretically select a compiler, but it is disabled in my case. I do need both versions as I have to keep 5.15.2 as a compile option. Changing the symlink to the version I need (update-alternatives
) is a workaround as it disables compiling against the other Qt version. Would be a blast to be able to select the compiler version directly and use/usr/bin/g++-9
instead of/usr/bin/g++
. -
@AxelVienna Can you show your Compilers tab? You can add compilers there, then you should be able to select needed compiler in a Kit.
-
This is the compilers tab
... and this is the kit, where the compiler selection is disabled.
(Pressing the "manage" button next to the compiler seleciton opens the compiler tab)
-
@AxelVienna said in Qt 6.2.2 experimental/filesystem => filesystem:
where the compiler selection is disabled
You can create a new Kit and configure it with same Qt version but another compiler.
-
Ah, the cloning did the trick. Was unaware of this, thanks for the hint.
While I use qmake from the Qt 6.2.2 tree, I still have to addQMAKE_CXX=g++-9
as an additional argument to the qmake build step. Then it works :-)