Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-503

Wrong order of static libraries in linker command line

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 1.2.0
    • 1.2.0
    • General
    • None
    • Kubuntu 13.10, GCC 4.8.1
    • 64602965cd5ef19742a604512ca7570f7b0fe7ca

    Description

      The attached project fails to build with link error:

      b.cpp:(.text+0x1): undefined reference to `a1()'
      

      The linker command line:

      /usr/bin/g++ -m64 -O2 -Wall -Wextra /home/a-baskanov/src/dep/qtc_Desktop-release/.obj/main/main.cpp.o -o /home/a-baskanov/src/dep/qtc_Desktop-release/main -Wl,-rpath,$ORIGIN /home/a-baskanov/src/dep/qtc_Desktop-release/libd.a /home/a-baskanov/src/dep/qtc_Desktop-release/libc.a /home/a-baskanov/src/dep/qtc_Desktop-release/liba.a /home/a-baskanov/src/dep/qtc_Desktop-release/libb.a -Wl,--unresolved-symbols=ignore-in-shared-libs
      

      It builds fine if I revert e679b1c6395484f145c309d64f7bb432f661aaac "fix duplicate arguments in linker command line"

      Attachments

        For Gerrit Dashboard: QBS-503
        # Subject Branch Project Status CR V

        Activity

          People

            jbornema Joerg Bornemann
            baskanov Anton Baskanov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes