Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Issue while deploying Qt application in Mac OSX
xtingray last edited by xtingray
This is my case:
I have been compiling and deploying my Qt project in Mac OSX since the Qt version 5.0 until the 5.5.1 with no issues. The process always has been transparent and fluid. These are the steps I used to follow:
cd src ./configure --prefix=/Users/me/installer make make install ./tools/build_mac_osx_app.sh /Users/me/app /Users/me/installer # this script handles all the library dependencies and the creation of the dmg file)
The source code of my script is available from:
No issues until here, life was perfect. Now, since Qt 5.6 and including 5.7 things started to change. The first issue I had is some kind of bug that only occurs to me in Mac with "staticlib" components. Here is my report:
To solve that issue, I decided to edit my Makefiles manually as a workaround, so I could compile the whole source code successfully again. Nevertheless, my script (build_mac_osx_app.sh) is not working any more. The .dmg file is created as usual and no warning messages are displayed, but when I try to run the application I got this error message:
dyld: Library not loaded: @rpath/QtOpenGL.framework/Versions/5/QtOpenGL Referenced from: /Users/me/installer/./Project.app/Contents/MacOS/Project Reason: image not found Trace/BPT trap: 5
Now, I figured out that if I define this variable:
Then I can run my application from console, like this:
But I need to run it from my .dmg file directly. So, what did change between Qt 5.x and Qt 5.6? What I have to fix to keep compiling and running my project with the latest version of Qt like I used to?
Thank you for any hint.