MacOS: Program built, but can't find Qt5 framework
-
wrote on 12 Sept 2023, 02:31 last edited by
Finally I've managed to get my (originally Linux) program running on MacOS (thanks, folks, for the help). At least, it runs from Qt Creator, but won't run from the command line, complaining that it can't find Qt5Core:
Reason: tried: '/Users/ron/Wombat/chronicles/chronicles/src/Chronicles.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore' (no such file), '/Users/ron/Wombat/chronicles/chronicles/src/Chronicles.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore' (no such file), '/Library/Frameworks/QtCore.framework/Versions/5/QtCore' (no such file), '/System/Library/Frameworks/QtCore.framework/Versions/5/QtCore' (no such file, not in dyld cache)
Now, the QtCore.framework is in /opt/local/libexec/qt5/lib/QtCore.framework/Versions/5/QtCore, but I don't know how to add that path to the operating system. How do I do that?
Thanks!
-
Finally I've managed to get my (originally Linux) program running on MacOS (thanks, folks, for the help). At least, it runs from Qt Creator, but won't run from the command line, complaining that it can't find Qt5Core:
Reason: tried: '/Users/ron/Wombat/chronicles/chronicles/src/Chronicles.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore' (no such file), '/Users/ron/Wombat/chronicles/chronicles/src/Chronicles.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore' (no such file), '/Library/Frameworks/QtCore.framework/Versions/5/QtCore' (no such file), '/System/Library/Frameworks/QtCore.framework/Versions/5/QtCore' (no such file, not in dyld cache)
Now, the QtCore.framework is in /opt/local/libexec/qt5/lib/QtCore.framework/Versions/5/QtCore, but I don't know how to add that path to the operating system. How do I do that?
Thanks!
@rjmx Take a look at https://doc.qt.io/qt-6/macos-deployment.html "Linking the Application to Qt as Frameworks" chapter
1/3