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

PkgConfigProbe link libraries include "-l" prefix

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 1.8.0
    • 1.7.0
    • None
    • Linux, gcc 5.4.0
    • 6f7ad4f7efed8b41e6eb75bca3132a7ffdbff461

    Description

      PkgConfigProbe returns raw libs output of pkg-config, which includes "-l" prefix on link library dependencies. So it can't be (easily) used with cpp.staticLibraries.

      A work-around is to use cpp.linkerFlags instead. But that results in linking the libraries before the using artifacts, so they are liable to be discarded (by gcc --as-needed) causing link to fail.

      I suggest PkgConfigProbe should strip the "-l" prefix so that idiomatic form becomes:

      qbs.Probes.PkgConfigProbe {id: foo; name: "bar" }
      cpp.cxxFlags: foo.cflags
      cpp.staticLibraries: foo.libs
      

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            dizygotheca Roger Siddons
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes