Mac .app crashes on launch for other people
-
So I built a Mac app with Qt creator, it runs fine on my machine, but when I send it to someone else it crashes...
(It's not code signed, they know to right click -> Open).
My question is: how do I build a self-contained binary from Qt Creator? Why would it need to reference something from the
/Users/MYUSERNAMEHERE/Applications/Qt/6.6.0/macos/lib/QtOpenGL.framework/Versions/A/QtOpenGL
directory?Or is the expectation that users of Qt-created projects also must have Qt installed at the "correct" directory? I think I missed an important build step somewhere, and can't find docs on it...
Termination Reason: Namespace DYLD, Code 1 Library missing Library not loaded: @rpath/QtOpenGL.framework/Versions/A/QtOpenGL Referenced from: <01F496E6-20C5-3D81-BEC5-1445E4FEE26A> /private/var/folders/*/InstrumentCluster.app/Contents/MacOS/InstrumentCluster Reason: tried: '/private/var/folders/0d/h8w6h17j3wz2xwmmgjdt7q8r0000gp/T/AppTranslocation/64BBE6BA-07D6-43A0-9E2A-00D59D3EB485/d/InstrumentCluster.app/Contents/Frameworks/QtOpenGL.framework/Versions/A/QtOpenGL' (no such file), '/Users/MYUSERNAMEHERE/Applications/Qt/6.6.0/macos/lib/QtOpenGL.framework/Versions/A/QtOpenGL' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/MYUSERNAMEHERE/Applications/Qt/6.6.0/macos/lib/QtOpenGL.framework/Versions/A/QtOpenGL' (no such file), '/private/var/folders/0d/h8w6h17j3wz2xwmmgjdt7q8r0000gp/T/AppTranslocation/64BBE6BA-07D6-43A0-9E2A-00D59D3EB485/d/InstrumentCluster.app/Contents/Frameworks/QtOpenGL.framework/Versions/A/QtOpenGL' (no such file), '/Users/MYUSERNAMEHERE/Applications/Qt/6.6.0/macos/lib/Q (terminated at launch; ignore backtrace)
-
Hi,
Did you use macdeployqt to prepare the bundle before distributing it ?
-
@loren Also remember you have to properly code sign your application if you want to distribute to other people. On intel macs it is not as bad as on Apple Silicon machines - these will not execute your program and you will find crash reports with SIGSEGV and code signature invalid on the machine using the console app.