I’m trying to deploy a Qt C++ application on another mac that doesn’t have Qt installed. I am getting a “Qt internal error: qt_menu.nib could not be loaded. The .nib file should be placed in QtGui.framework/Versions/Current/Resources/ or in the resources directory of your application bundle.”
I’ve tried packing qt_menu.lib into both suggested places, with no success:
$ ls ./arya.app/Resources/
qt_menu.nib
$ ./arya.app/Contents/MacOS/arya
Qt internal error: qt_menu.nib could not be loaded. The .nib file should be placed in QtGui.framework/Versions/Current/Resources/ or in the resources directory of your application bundle.
or:
$ mkdir QtGui.framework
$ mkdir QtGui.framework/Versions/
$ mkdir QtGui.framework/Versions/Current/
$ mkdir QtGui.framework/Versions/Current/Resources
$ mv ./arya.app/Resources/qt_menu.nib QtGui.framework/Versions/Current/Resources/
$ ./arya.app/Contents/MacOS/arya
Qt internal error: qt_menu.nib could not be loaded. The .nib file should be placed in QtGui.framework/Versions/Current/Resources/ or in the resources directory of your application bundle.
I’m not sure if there may be some connection, but I had some issues with dylib paths before this. After stumbling about with install_name_tool, I ‘solved’ them with:
export DYLD_LIBRARY_PATH=.
before running the application.
Building the application with
CONFIG -= app_bundle
made no difference.
After battling this same problem from another application, I’ve managed to pin down the exact commands that easily solve this .nib issue:
This does not address other issues on deploying for mac – just the .nib problem.