【发布时间】:2022-04-05 19:32:52
【问题描述】:
我尝试在 MAC OS 上使用 QML 构建应用程序。开始构建时出现错误。
Could not parse otool output: "/Users/test/qt/dev/projects/TestProject/build-rproxychecker2-Desktop_Qt_5_15_2_clang_64bit-Debug/debug/ch2.app/Contents/Resources/qml/QtQml/Models.2/libmodelsplugin.dylib.dSYM/Contents/Resources/DWARF/libmodelsplugin.dylib:\n"
Could not parse otool output: "/Users/test/qt/dev/projects/TestProject/build-rproxychecker2-Desktop_Qt_5_15_2_clang_64bit-Debug/debug/ch2.app/Contents/Resources/qml/QtQml/StateMachine/libqtqmlstatemachine.dylib.dSYM/Contents/Resources/DWARF/libqtqmlstatemachine.dylib:\n"
Could not parse otool output: "/Users/test/qt/dev/projects/TestProject/build-rproxychecker2-Desktop_Qt_5_15_2_clang_64bit-Debug/debug/ch2.app/Contents/Resources/qml/QtQml/StateMachine/libqtqmlstatemachine.dylib.dSYM/Contents/Resources/DWARF/libqtqmlremoteobjects.dylib:\n"
Could not parse otool output: "/Users/test/qt/dev/projects/TestProject/build-rproxychecker2-Desktop_Qt_5_15_2_clang_64bit-Debug/debug/ch2.app/Contents/Resources/qml/QtQml/StateMachine/libqtqmlstatemachine.dylib.dSYM/Contents/Resources/DWARF/libqmlplugin.dylib:\n"
...
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: string table not at the end of the file (can't be processed) in file:/Users/test/qt/dev/projects/TestProject/buildrproxychecker2Desktop_Qt_5_15_2_clang_64bitDebug/debug/ch2.app/Contents/Resources/qml/QtQml/Models.2/libmodelsplugin.dylib.dSYM/Contents/Resources/DWARF/libmodelsplugin.dylib\n"
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: string table not at the end of the file (can't be processed) in file:/Users/test/qt/dev/projects/TestProject/buildrproxychecker2Desktop_Qt_5_15_2_clang_64bitDebug/debug/ch2.app/Contents/Resources/qml/QtQml/Models.2/libmodelsplugin.dylib.dSYM/Contents/Resources/DWARF/libqtqmlstatemachine.dylib\n"
...
我使用 QT 5.15.2、Xcode 10.3、QtCreator 5.0 并且有一个包含这些参数的 .pro 文件。
QT += core gui network sql quickwidgets quick quickcontrols2
...
lupdate_only {
SOURCES += qml
}
...
macdeployqt $${DESTDIR}/$${TARGET}.app -qmldir=$${PWD}/qml -always-overwrite;
我尝试在没有 -always-overwrite https://bugreports.qt.io/browse/QTBUG-57265 的情况下调用 macdeployqt,但没有帮助。有人有同样的问题吗?
【问题讨论】:
标签: macos qt deployment qml