Solved @rpath is empty and libs are not found OSX
-
after succesful compilation, running completed app fails
Library not loaded: @rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport
seemingly rpath is an unknown
otool -l myapp.app/Contents/MacOS/myapp | grep -A2 LC_RPATH
gives an empty response
so seemingly qt libraries are not usefully linked by app.
using
QMAKE_LFLAGS += -Wl,-rpath,@executable_path/../Frameworks
doesnt help, again opening fails as lib not found
as the deps are not in that location, rather they are in
Users/User/Qt5.7.0/5.7/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets..
osx 10.10.5
qtcreator 5.7.0 -
Probably a dumb question..
Have you used macdeployqt to move the Frameworks used by your app into the My.app bundle?
If you did, the
@executable_path/../Frameworks
should then point to the location they would be at run-time.
-
Hi,
It's
otool -l
with lowercase L and you should call it on your executable not your bundle. -
@SGaist said in @rpath is empty and libs are not found OSX:
Hi,
It's
otool -l
with lowercase L and you should call it on your executable not your bundle.haha yes, typos on my part. i've fixed the post above thanks
-
@PSI_lbc said in @rpath is empty and libs are not found OSX:
Probably a dumb question..
Have you used macdeployqt to move the Frameworks used by your app into the My.app bundle?
If you did, the
@executable_path/../Frameworks
should then point to the location they would be at run-time.
cool thanks,
running macdeployqt does result in a working app.i guess then the only way to avoid this is to build qtcreator myself with the "-no-rpath-" switch