Important: Please read the Qt Code of Conduct -

[solved] dyld: Library not loaded, Reason: image not found

  • Today I am trying to get "kQOAuth": to run on OSX. ("Yesterday it was Windows":

    I built it and did make install with this output:

    @alis-imac:kqoauth ali$ sudo make install
    cd src/ && make -f Makefile install
    rm -f -r "/Users/ali/QtSDK/Desktop/Qt/473/gcc/lib/kqoauth.framework"
    cp -f -R "../lib/kqoauth.framework" "/Users/ali/QtSDK/Desktop/Qt/473/gcc/lib/kqoauth.framework"
    cp -f "../lib/kqoauth.framework/kqoauth.prl" "/Users/ali/QtSDK/Desktop/Qt/473/gcc/lib/kqoauth.framework/kqoauth.prl"
    cp -f /Traktor-Scrobbler/libs/kqoauth/kqoauth.prf /Users/ali/QtSDK/Desktop/Qt/473/gcc//mkspecs/features/
    cd examples/ && make -f Makefile install
    make[1]: Nothing to be done for install'. cd tests/ && make -f Makefile install cd ut_kqoauth/ && make -f Makefile install make[2]: Nothing to be done forinstall'.
    cd ft_kqoauth/ && make -f Makefile install
    make[2]: Nothing to be done for `install'.
    alis-imac:kqoauth ali$

    kQOAuth resides in the subfolder libs/kQOAuth of my project.

    I added the osx-part of the example's .pro-file to my .pro-file and adjusted the path:

    @macx {
    CONFIG -= app_bundle
    QMAKE_POST_LINK += install_name_tool -change kqoauth.framework/Versions/0/kqoauth
    lib/kqoauth.framework/Versions/0/kqoauth $${TARGET}

    Everytime I'm trying to run my project I get this error:

    @dyld: Library not loaded: lib/kqoauth.framework/Versions/0/kqoauth
    Referenced from: /macbuild/MyProject
    Reason: image not found
    The program has unexpectedly finished.@

    What did I specify wrong?

  • OK, I removed the two lines mentioned above in the .pro-file and put the library in the application bundle myself.
    It works now.

Log in to reply