Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-32674

Qt Creator uses wrong source reference for linker messages

    XMLWordPrintable

Details

    • Linux/Wayland
    • 102333d4a (master)

    Description

      When ld outputs errors about missing functions, the message contains location at which the functions is used, but Qt Creator picks up location in .o file and upon clicking the error, opens a binary.

      /usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: Build.dir/Target.dir/path/to/source_file.cpp.o: in function `foo()':
      /path/to/source_file.cpp:42:(.text+0xb58): undefined reference to `bar()'
      /usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: /path/to/source_file.cpp:138:(.text+0xbc2): undefined reference to `bar()'
      

      Rather than a link to /path/to/source_file.cpp:42, Qt Creator provides a link to Build.dir/Target.dir/path/to/source_file.cpp.o

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            eugeneshalygin Eugene Shalygin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes