S
S
Sergey Savostin2015-09-26 15:39:21
Qt
Sergey Savostin, 2015-09-26 15:39:21

How to understand why Qt GUI program crashes after deployment on Mac OS?

I'm trying to make a deployment program.
Done macdeployqt, checked all the links otool, checked export DYLD_PRINT_LIBRARIES=1everything as in the official documentation . All paths are correct. Even fed macdeployqtfix - did not help.
If you go inside Application.app with a terminal and run it from there, the program starts.
If you run Application.app from Finder, it crashes.
If you go inside Finder's .app and run it in the terminal from there, then

This application failed to start because it could not find or load the Qt platform plugin "cocoa".

The plugin itself seems to be in place: Application.app/Content/PlugIns/platforms/
Just in case, I made a symlink in Application.app/Content/MacOs/ (without it, it gave the same error even in the terminal).
I tried to force clear and create the "correct" relative paths in the program QCoreApplication::setLibraryPaths- without this, it starts loading from the Qt'a folder ...
How to determine the cause of the crash and is there a sane deployment tutorial for MacOS?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jacob E, 2015-09-27
@savostin

Let's try again.

  1. Demolishing Application.app
  2. Building the project as a release
  3. Set up macdeployqt,
  4. Rename the folder with Qt
  5. Trying to launch from finder
  6. If it doesn't work, we throw off the output of otool -L App.app/Contents/MacOS/App on pastebin.com and the link in the comment

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question