Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qbs: dylib - library not loaded, image not found
Forum Updated to NodeBB v4.3 + New Features

qbs: dylib - library not loaded, image not found

Scheduled Pinned Locked Moved Unsolved General and Desktop
qbs
3 Posts 2 Posters 1.2k Views 1 Watching
  • 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.
  • daamaamD Offline
    daamaamD Offline
    daamaam
    wrote on last edited by
    #1

    I'm trying to build a qbs project using the leap motion library but on running the project am given the following error:

    dyld: Library not loaded: @loader_path/libLeap.dylib
    Referenced from: /Users/pball/Work/Code/Qt/build-LeapTest-Desktop-Debug/qtc_Desktop_95cbad6a-debug/install-root/LeapTest
    Reason: image not found
    

    My qbs file:

    import qbs
    CppApplication {
    consoleApplication: true
    files: "main.cpp"
    
    Group {     // Properties for the produced executable
        fileTagsFilter: product.type
        qbs.install: true
    }
    
    cpp.includePaths: [".","/Users/pball/LeapSDK/include"]
    cpp.libraryPaths: ["/Users/pball/LeapSDK/lib"]
    
    cpp.dynamicLibraries: "Leap"
    }
    

    libLeap.dylib is in that location and I am able to work with the library when linking with qmake.

    Using Qt 5.6.0

    New to using qbs so any help / pointers greatly appreciated.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You likely have to add /Users/pball/LeapSDK/include to QMAKE_RPATHDIR .however I don't know how to do it with QBS, I haven't used it yet.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • daamaamD Offline
        daamaamD Offline
        daamaam
        wrote on last edited by
        #3

        Just as a follow up, sorted this by copying libLeap.dylib into the same directory as the application binary.

        1 Reply Last reply
        0

        • Login

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