I try change CLion toolchain from GCC to Clang. I have install clang.
Is error:
CMake Error at /home/andrzej/.local/share/JetBrains/Toolbox/apps/clion/bin/cmake/linux/x64/share/cmake-3.26/Modules/CMakeTestCXXCompiler.cmake:60 (message):
The C++ compiler
"/usr/bin/clang++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/andrzej/wazne/gitmy/qt-textviewer/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-ZgHnsL
Run Build Command(s):/home/andrzej/.local/share/JetBrains/Toolbox/apps/clion/bin/ninja/linux/x64/ninja -v cmTC_d4193 && [1/2] /usr/bin/clang++ -fcolor-diagnostics -MD -MT CMakeFiles/cmTC_d4193.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_d4193.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_d4193.dir/testCXXCompiler.cxx.o -c /home/andrzej/wazne/gitmy/qt-textviewer/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-ZgHnsL/testCXXCompiler.cxx
[2/2] : && /usr/bin/clang++ CMakeFiles/cmTC_d4193.dir/testCXXCompiler.cxx.o -o cmTC_d4193 && :
FAILED: cmTC_d4193
: && /usr/bin/clang++ CMakeFiles/cmTC_d4193.dir/testCXXCompiler.cxx.o -o cmTC_d4193 && :
/usr/bin/ld: cannot find -lstdc++: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
especially
cannot find -lstdc++ whereas is installed with Gcc.
Maybe error because of /usr/bin/ld instead of lld?
==================
Solution: I have installed g+±12