无法编译Qt Creator 5.9错误
问题描述:
不知道如何解决这个问题或为什么它发生任何帮助将非常感激。谢谢如果还有什么我应该张贴协助大声笑请让我知道!谢谢!无法编译Qt Creator 5.9错误
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QTouchEvent::TouchPoint::rotation() [email protected]_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::createPlatformMenuBar() [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickTemplates2.so.5: undefined reference to `QPlatformDialogHelper::buttonLayout(Qt::Orientation, QPlatformDialogHelper::ButtonLayout)@Qt_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QTouchEvent::TouchPoint::ellipseDiameters() [email protected]_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QInputControl::isCommonTextEditShortcut(QKeyEvent const*)@Qt_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QInputControl::QInputControl(QInputControl::Type, QObject*)@Qt_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QOpenGLShaderProgram::addCacheableShaderFromSourceCode(QFlags<QOpenGLShader::ShaderTypeBit>, char const*)@Qt_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::font(QPlatformTheme::Font) [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::createPlatformSystemTrayIcon() [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QT_DISTANCEFIELD_SCALE(bool)@Qt_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::QPlatformTheme()@Qt_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `typeinfo for [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QInputControl::[email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QInputControl::qt_metacall(QMetaObject::Call, int, void**)@Qt_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::standardButtonShortcut(int) [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QPointingDeviceUniqueId::[email protected]_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::createPlatformDialogHelper(QPlatformTheme::DialogType) [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QOpenGLShaderProgram::addCacheableShaderFromSourceCode(QFlags<QOpenGLShader::ShaderTypeBit>, QByteArray const&)@Qt_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::standardPixmap(QPlatformTheme::StandardPixmap, QSizeF const&) [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::fileIcon(QFileInfo const&, QFlags<QPlatformTheme::IconOption>) [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QT_DISTANCEFIELD_BASEFONTSIZE(bool)@Qt_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QFileSelectorPrivate::selectionHelper(QString const&, QString const&, QStringList const&, QChar const&)@Qt_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickTemplates2.so.5: undefined reference to `QPlatformDialogHelper::buttonRole(QPlatformDialogHelper::StandardButton)@Qt_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `[email protected]_5.9'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QTouchEvent::TouchPoint::uniqueId() [email protected]_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QInputControl::qt_metacast(char const*)@Qt_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `typeinfo for [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::palette(QPlatformTheme::Palette) [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::createIconEngine(QString const&) [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::standardButtonText(int) [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QT_DISTANCEFIELD_HIGHGLYPHCOUNT()@Qt_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::themeHint(QPlatformTheme::ThemeHint) [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::createPlatformMenu() [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `operator delete(void*, unsigned long)@Qt_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::createPlatformMenuItem() [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QInputControl::QInputControl(QInputControl::Type, QObjectPrivate&, QObject*)@Qt_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Qml.so: undefined reference to `operator delete[](void*, unsigned long)@Qt_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `vtable for [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::keyBindings(QKeySequence::StandardKey) [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Qml.so: undefined reference to `QDateTime::QDateTime(QDateTime&&)@Qt_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickTemplates2.so.5: undefined reference to `QStyleHints::useHoverEffects() [email protected]_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickTemplates2.so.5: undefined reference to `QPlatformTheme::removeMnemonics(QString const&)@Qt_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QPointingDeviceUniqueId::fromNumericId(long long)@Qt_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::~QPlatformTheme()@Qt_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QColor::setNamedColor(QLatin1String)@Qt_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QOpenGLShaderProgram::addCacheableShaderFromSourceCode(QFlags<QOpenGLShader::ShaderTypeBit>, QString const&)@Qt_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QInputControl::isAcceptableInput(QKeyEvent const*) [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::usePlatformNativeDialog(QPlatformTheme::DialogType) [email protected]_5_PRIVATE_API'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QT_DISTANCEFIELD_RADIUS(bool)@Qt_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QStringRef::isRightToLeft() [email protected]_5'
/opt/Qt/5.9.1/gcc_64/lib/libQt5QuickTemplates2.so.5: undefined reference to `QPlatformDialogHelper::[email protected]_5_PRIVATE_API'
Makefile:264: recipe for target 'LiveViewControl' failed
collect2: error: ld returned 1 exit status
make: *** [LiveViewControl] Error 1
16:42:53: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project LiveViewControl (kit: Desktop Qt 5.9.1 GCC 64bit)
When executing step "Make"
16:42:53: Elapsed time: 00:03.
项目文件:
QT += qml quick network core widgets multimedia quickcontrols2
CONFIG += c++11
RESOURCES += qml.qrc
LIBS += -L/usr/lib/x86_64-linux-gnu -lusb-1.0 -L/root/DSR/gphoto-dev/libsonyumcr10c/out/lib -lsoccptp
INCLUDEPATH += /usr/include/libusb-1.0
INCLUDEPATH += /root/DSR/gphoto-dev/libsonyumcr10c/libsoccptp/include/
INCLUDEPATH += /root/DSR/gphoto-dev/libsonyumcr10c/libsoccptp/ports/
INCLUDEPATH += /root/DSR/gphoto-dev/libsonyumcr10c/examples/
SOURCES += main.cpp \
applicationmanager.cpp \
sonycamera.cpp \
sonyfunctions.cpp
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =
# Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH =
ANDROID_PACKAGE_SOURCE_DIR =
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the CREATING STERAM FROM CAMREAfollowing line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
# DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
DISTFILES += \
LiveviewPageForm.ui.qml \
LiveviewPage.qml \
src/js/LivelivePageJs.js \
src/js/LiveviewPageJs.js \
src/img/corsshair.png
HEADERS += \
applicationmanager.h \
ptpdeviceinfo.h \
sonycamera.h \
sonycodes.h \
sonyfunctions.h
答
我想通了跑
qmake --version
,只见它用错了Qt的版本修复它,它编译。
从Qt例子开始,注意项目文件。找到“Qt快速演示”。我可以想象你的项目文件中缺少'QT + = qml quick'。但是发现自己是值得的。 – AlexanderVX
嘿,谢谢你没有它 – demo7up
你应该马上提供这个项目文件。 – AlexanderVX