⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)
[SOLVED][MacOS] Problem with libraries, can't start the program
I got a problem running my application on MacOS, it compiles but can't start it. It works just fine on Android and iOS.
There is an output I get after start:
@dyld: Library not loaded: /work/build/PADDING/lib/QtQuick.framework/Versions/5/QtQuick
Referenced from: /Users/olek/Documents/build-DEIMIC-Desktop_Qt_5_2_1_clang_64bit-Debug/DEIMIC.app/Contents/MacOS/DEIMIC
Reason: image not found@
I used @otool -L@ command but I am not very familiar with MacOS and I am not sure what I should do.
There is an output:
/work/build/PADDING/lib/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.2.0, current version 5.2.1)
/work/build/PADDING/lib/QtQml.framework/Versions/5/QtQml (compatibility version 5.2.0, current version 5.2.1)
/work/build/PADDING/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.2.0, current version 5.2.1)
/work/build/PADDING/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.2.0, current version 5.2.1)
/work/build/PADDING/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.2.0, current version 5.2.1)
/work/build/PADDING/lib/QtSvg.framework/Versions/5/QtSvg (compatibility version 5.2.0, current version 5.2.1)
/work/build/PADDING/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.2.0, current version 5.2.1)
/work/build/PADDING/lib/QtDeclarative.framework/Versions/5/QtDeclarative (compatibility version 5.2.0, current version 5.2.1)
/work/build/PADDING/lib/QtXmlPatterns.framework/Versions/5/QtXmlPatterns (compatibility version 5.2.0, current version 5.2.1)
/work/build/PADDING/lib/QtSql.framework/Versions/5/QtSql (compatibility version 5.2.0, current version 5.2.1)
/work/build/PADDING/lib/QtScript.framework/Versions/5/QtScript (compatibility version 5.2.0, current version 5.2.1)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)@
Thanks in advance.
Do you mean by double clicking on the executable ? If so, did you run macdeployqt ?
I get this error after starting the app from Qt (cmd+r).
Sorry for the late reply, this generally comes from an installation that ended with an error.
Did you properly setup Xcode before installing Qt ?
I think so, since I can use Qt to compile program for iOS, the problem is only with Mac
hskoglund last edited by
Hi, when you see that "PADDING" in otool, that is what SGaist says, from an installation of Qt that ended prematurely.
You could check your Mac installation in QtCreator, go to Preferences, Build & Run, select the Qt Versions tab. Look under "Auto-detected", it should say "Qt 5.2.1 clang 64bit....". Click on that line. Then open first Details box a bit below and check the "QT_INSTALL_LIBS", it should say something like "/Users/olek/Qt/5.2.1/clang_64/lib.
I checked it and it is set just the way you said it should:
Qt 5.2.1 clang 64bit
The only missing value is QT_SYSROOT
EDIT: Anyway I will try to reinstall Qt and see the result
EDIT 2: Not sure what is the difference but after reinstalling it works.
sorinns last edited by
You need to reference somewhere in the install procedure for mac that you do need to RUN XCODE and agree the software license before installing Qt.
Only having it installed is not enough.
It's maybe logical, but not for a newbie that only want for example to do some interface mockup and he is not interested at all in xcode.