Getting dyld: libaray not loaded on a newly built app and associated lib.

  • Hi Folks;
    I am working on porting an app built on windows with VS2010 to Mac with Qt Creator. I am trying to get our base library to build correctly, to place the output libraries where i want them and to be able to access some of the functionality from a test app i have created.
    So far the library seems to build fine but it places the output files in the library project directory instead of the common build folders as listed below:
    Release:DLLDESTDIR = ../../../../build/bin/release
    Release:DESTDIR = ../../../../build/lib/release
    any idea why this would not work?

    That being said in the test project i have pointed to where the files are currently being generated. Everything compiles fine but when i go to run i get the error: "dyld: libaray not loaded: " libXXXXXX.1.dylib.
    I have libXXXXXX.dylib added under libs in the test project and i see the following files where built during compilation.
    libXXXXXX.1.0.dylib -->seems to be alias or shortcut
    libXXXXXX.1.dylib -->seems to be alias or shortcut
    libXXXXXX.dylib -->seems to be alias or shortcut

    what could be wrong?

  • You need to add the path to the dylib files to DYLD_LIBRARAY_PATH for the executabel to find them. Maybe the macdeployqt tool could be of help too.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.