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

qbs doesn't export frameworkPaths to importing product

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • 2.0.1
    • API: C++
    • None
    • macOS

      Hi!I noticed, that qbs export frameworks to importing product, but doesn't export paths to them.

       

      import qbs.FileInfo

      Project {
          Product {
              name: "app"
              type: ["application"]

              Depends { name: "cpp" }
              Depends { name: "dep" }

              files: ["main.cpp"]
          }

          Product {
              name: "dep"
              type: ["staticlibrary"]

              files: ["lib.cpp"]

              Depends { name: "cpp" }
              cpp.frameworks: base.concat("RtPcsc")
              cpp.frameworkPaths: base.concat(FileInfo.joinPaths(sourceDirectory, "/external"))
          }
      }

       

      Output:

      linking app [app]
      ERROR: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -Wl,-arch,arm64 -stdlib=libc++ -target arm64-apple-ios11.0-macho -o /Users/developer/Documents/projects/qbs_test/build/default/app.7d104347/app /Users/developer/Documents/projects/qbs_test/build/default/app.7d104347/3a52ce780950d4d9/main.cpp.o /Users/developer/Documents/projects/qbs_test/build/default/dep.e9fad0c6/libdep.a -framework RtPcsc

      ERROR: ld: framework not found RtPcsc
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      ERROR: Process failed with exit code 1.
      The following products could not be built for configuration default:
      app

       

      I expect that qbs export them too. 

       

      I include framework to dep, because it contains headers .

       

      The same problem may be reproduced with dynamic libraries. I think it should be fixed too, because dep may depends on product with dynamic library and headers for it

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

            kandeler Christian Kandeler
            lo1ol Petr Mikhalitsyn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes