Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
qmake, Mac OS X, dylib and bundles
danielkoch last edited by
I'm trying to pack the OpenCV's dylibs to my bundle. That's the snippet of my .pro file:
LIBS += $$system(/usr/local/bin/pkg-config --libs opencv)
RESFILES.files = /usr/local/lib/libopencv_calib3d.2.4.dylib /usr/local/lib/libopencv_contrib.2.4.dylib ... (too long list to put here)
RESFILES.path = Contents/MacOS
QMAKE_BUNDLE_DATA += RESFILES
My app works well on my development machine, and it copies all the dylibs files to the path "Contents/MacOS". But when I try run it from my deploy machine it still try to run dylibs files from /usr/local/lib, which doesn't exists there. I've got:
Dyld Error Message:
Library not loaded: */libopencv_ocl.2.4.dylib
Referenced from: /Users/USER/Downloads/BlockMonitor.app/Contents/MacOS/BlockMonitor
Reason: image not found
What am I forgetting?
Hi and welcome to devnet,
Did you run macdeployqt on your bundle ?