Qt 6 on Linux linker error "adding symbols: DSO missing from command line"
-
Hello,
I installed Qt 6 on Linux. In all my projects I get this error during linking. Shown below is an example of a simple new Qt application with a form. This project is using cmakeSearching the web, I saw a suggestion to add "-lstdc++" to the command line. Since Qt has always worked without me having to do this, I wanted to ask the question here.
Can I get a hint on how to resolve this please? I have no idea what this error means.
Thanks
[100%] Linking CXX executable delete-this /usr/bin/ld: CMakeFiles/delete-this.dir/mainwindow.cpp.o: undefined reference to symbol '_ZSt9terminatev@@GLIBCXX_3.4' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line clang-10: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [CMakeFiles/delete-this.dir/build.make:138: delete-this] Error 1 make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/delete-this.dir/all] Error 2 make: *** [Makefile:103: all] Error 2 12:39:02: The process "/Qt/Tools/CMake/bin/cmake" exited with code 2. Error while building/deploying project delete-this (kit: Desktop Qt 6.0.4 GCC 64bit) When executing step "CMake Build
-
Create a new project with form, build/run - you should see a blank form with no modifications to the code or project.pro. I don't understand the line beginning with 'clang-10'. Check Tools|Options|Kits - make sure the Compiler entries for C and C++ are set to GCC(C...) GCC(C++...). You might have the C++ compiler set to 'clang' instead of GCC.
-