Clueless Qt Creator 5.9 编译错误

Clueless Qt Creator 5.9 errors on compile

不太确定如何解决这个问题或为什么会发生任何帮助将不胜感激。谢谢 如果还有什么我应该 post 来协助的,哈哈,请告诉我!谢谢!

/opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QTouchEvent::TouchPoint::rotation() const@Qt_5'
    /opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::createPlatformMenuBar() const@Qt_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() const@Qt_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) const@Qt_5_PRIVATE_API'
    /opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::createPlatformSystemTrayIcon() const@Qt_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 QPlatformTheme@Qt_5_PRIVATE_API'
    /opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QInputControl::staticMetaObject@Qt_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) const@Qt_5_PRIVATE_API'
    /opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QPointingDeviceUniqueId::staticMetaObject@Qt_5'
    /opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::createPlatformDialogHelper(QPlatformTheme::DialogType) const@Qt_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&) const@Qt_5_PRIVATE_API'
    /opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::fileIcon(QFileInfo const&, QFlags<QPlatformTheme::IconOption>) const@Qt_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 `qt_version_tag@Qt_5.9'
    /opt/Qt/5.9.1/gcc_64/lib/libQt5Quick.so: undefined reference to `QTouchEvent::TouchPoint::uniqueId() const@Qt_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 QInputControl@Qt_5_PRIVATE_API'
    /opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::palette(QPlatformTheme::Palette) const@Qt_5_PRIVATE_API'
    /opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::createIconEngine(QString const&) const@Qt_5_PRIVATE_API'
    /opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::standardButtonText(int) const@Qt_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) const@Qt_5_PRIVATE_API'
    /opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::createPlatformMenu() const@Qt_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() const@Qt_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 QInputControl@Qt_5_PRIVATE_API'
    /opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::keyBindings(QKeySequence::StandardKey) const@Qt_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() const@Qt_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*) const@Qt_5_PRIVATE_API'
    /opt/Qt/5.9.1/gcc_64/lib/libQt5QuickControls2.so: undefined reference to `QPlatformTheme::usePlatformNativeDialog(QPlatformTheme::DialogType) const@Qt_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() const@Qt_5'
    /opt/Qt/5.9.1/gcc_64/lib/libQt5QuickTemplates2.so.5: undefined reference to `QPlatformDialogHelper::staticMetaObject@Qt_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 版本修复它并编译。