Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Qt 6 on Linux linker error "adding symbols: DSO missing from command line"

Qt 6 on Linux linker error "adding symbols: DSO missing from command line"

Scheduled Pinned Locked Moved Solved Qt 6
3 Posts 2 Posters 3.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JohnGa
    wrote on last edited by JohnGa
    #1

    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 cmake

    Searching 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
    
    PsnarfP 1 Reply Last reply
    0
    • J JohnGa

      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 cmake

      Searching 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
      
      PsnarfP Offline
      PsnarfP Offline
      Psnarf
      wrote on last edited by Psnarf
      #2

      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.

      J 1 Reply Last reply
      1
      • PsnarfP Psnarf

        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.

        J Offline
        J Offline
        JohnGa
        wrote on last edited by
        #3

        @Psnarf, Thanks for the tip.
        On a hunch, instead of using the auto-detected Qt6, I manually created a new kit. This resolved the issue.

        I looked at both the auto-detected and the manually created kit, but could NOT spot any differences.

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved