0

我是 Qt 的新手,我在 Qt 中创建了一个 GUI 应用程序,一切都很好,直到我从QtCreator. 现在我收到许多链接器错误,我对如何解决它们一无所知。

我尝试恢复到以前的构建文件夹,但它再次失败。我确实清理了项目并每次都进行了重建,但没有任何效果。这是我得到的那些链接器错误的列表:

    11:50:08: Running steps for project Ann_network...
11:50:08: Configuration unchanged, skipping qmake step.
11:50:08: Starting: "L:\Qt\Qt5.5.0\Tools\QtCreator\bin\jom.exe" 
    L:\Qt\Qt5.5.0\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
    link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\Ann_network.exe @C:\Users\Master\AppData\Local\Temp\Ann_network.exe.7864.15.jom
mainwindow.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPAxis::setRange(double,double)" (?setRange@QCPAxis@@QEAAXNN@Z) referenced in function "private: void __cdecl MainWindow::Init(void)" (?Init@MainWindow@@AEAAXXZ)
mainwindow.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPAxis::setLabel(class QString const &)" (?setLabel@QCPAxis@@QEAAXAEBVQString@@@Z) referenced in function "private: void __cdecl MainWindow::Init(void)" (?Init@MainWindow@@AEAAXXZ)
moc_qcustomplot.obj : error LNK2001: unresolved external symbol "public: void __cdecl QCPAxis::setLabel(class QString const &)" (?setLabel@QCPAxis@@QEAAXAEBVQString@@@Z)
mainwindow.obj : error LNK2019: unresolved external symbol "public: __cdecl QCustomPlot::QCustomPlot(class QWidget *)" (??0QCustomPlot@@QEAA@PEAVQWidget@@@Z) referenced in function "public: void __cdecl Ui_MainWindow::setupUi(class QMainWindow *)" (?setupUi@Ui_MainWindow@@QEAAXPEAVQMainWindow@@@Z)
mainwindow.obj : error LNK2019: unresolved external symbol "public: class QCPGraph * __cdecl QCustomPlot::graph(int)const " (?graph@QCustomPlot@@QEBAPEAVQCPGraph@@H@Z) referenced in function "private: void __cdecl MainWindow::XORNet(bool)" (?XORNet@MainWindow@@AEAAX_N@Z)
mainwindow.obj : error LNK2019: unresolved external symbol "public: class QCPGraph * __cdecl QCustomPlot::addGraph(class QCPAxis *,class QCPAxis *)" (?addGraph@QCustomPlot@@QEAAPEAVQCPGraph@@PEAVQCPAxis@@0@Z) referenced in function "private: void __cdecl MainWindow::Init(void)" (?Init@MainWindow@@AEAAXXZ)
mainwindow.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCustomPlot::replot(enum QCustomPlot::RefreshPriority)" (?replot@QCustomPlot@@QEAAXW4RefreshPriority@1@@Z) referenced in function "private: void __cdecl MainWindow::XORNet(bool)" (?XORNet@MainWindow@@AEAAX_N@Z)
moc_qcustomplot.obj : error LNK2001: unresolved external symbol "public: void __cdecl QCustomPlot::replot(enum QCustomPlot::RefreshPriority)" (?replot@QCustomPlot@@QEAAXW4RefreshPriority@1@@Z)
mainwindow.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPGraph::setData(class QVector<double> const &,class QVector<double> const &)" (?setData@QCPGraph@@QEAAXAEBV?$QVector@N@@0@Z) referenced in function "private: void __cdecl MainWindow::XORNet(bool)" (?XORNet@MainWindow@@AEAAX_N@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPLayer::setVisible(bool)" (?setVisible@QCPLayer@@QEAAX_N@Z) referenced in function "private: static void __cdecl QCPLayer::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall@QCPLayer@@CAXPEAVQObject@@W4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPLayerable::setVisible(bool)" (?setVisible@QCPLayerable@@QEAAX_N@Z) referenced in function "private: static void __cdecl QCPLayerable::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall@QCPLayerable@@CAXPEAVQObject@@W4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: bool __cdecl QCPLayerable::setLayer(class QCPLayer *)" (?setLayer@QCPLayerable@@QEAA_NPEAVQCPLayer@@@Z) referenced in function "private: static void __cdecl QCPLayerable::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall@QCPLayerable@@CAXPEAVQObject@@W4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPLayerable::setAntialiased(bool)" (?setAntialiased@QCPLayerable@@QEAAX_N@Z) referenced in function "private: static void __cdecl QCPLayerable::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall@QCPLayerable@@CAXPEAVQObject@@W4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPLayoutElement::setOuterRect(class QRect const &)" (?setOuterRect@QCPLayoutElement@@QEAAXAEBVQRect@@@Z) referenced in function "public: virtual int __cdecl QCPLayoutElement::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPLayoutElement@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPLayoutElement::setMargins(class QMargins const &)" (?setMargins@QCPLayoutElement@@QEAAXAEBVQMargins@@@Z) referenced in function "public: virtual int __cdecl QCPLayoutElement::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPLayoutElement@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPLayoutElement::setMinimumMargins(class QMargins const &)" (?setMinimumMargins@QCPLayoutElement@@QEAAXAEBVQMargins@@@Z) referenced in function "public: virtual int __cdecl QCPLayoutElement::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPLayoutElement@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPLayoutElement::setMinimumSize(class QSize const &)" (?setMinimumSize@QCPLayoutElement@@QEAAXAEBVQSize@@@Z) referenced in function "public: virtual int __cdecl QCPLayoutElement::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPLayoutElement@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPLayoutElement::setMaximumSize(class QSize const &)" (?setMaximumSize@QCPLayoutElement@@QEAAXAEBVQSize@@@Z) referenced in function "public: virtual int __cdecl QCPLayoutElement::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPLayoutElement@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: int __cdecl QCPLayoutGrid::rowCount(void)const " (?rowCount@QCPLayoutGrid@@QEBAHXZ) referenced in function "public: virtual int __cdecl QCPLayoutGrid::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPLayoutGrid@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: int __cdecl QCPLayoutGrid::columnCount(void)const " (?columnCount@QCPLayoutGrid@@QEBAHXZ) referenced in function "public: virtual int __cdecl QCPLayoutGrid::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPLayoutGrid@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPLayoutGrid::setColumnStretchFactors(class QList<double> const &)" (?setColumnStretchFactors@QCPLayoutGrid@@QEAAXAEBV?$QList@N@@@Z) referenced in function "public: virtual int __cdecl QCPLayoutGrid::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPLayoutGrid@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPLayoutGrid::setRowStretchFactors(class QList<double> const &)" (?setRowStretchFactors@QCPLayoutGrid@@QEAAXAEBV?$QList@N@@@Z) referenced in function "public: virtual int __cdecl QCPLayoutGrid::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPLayoutGrid@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPLayoutGrid::setColumnSpacing(int)" (?setColumnSpacing@QCPLayoutGrid@@QEAAXH@Z) referenced in function "public: virtual int __cdecl QCPLayoutGrid::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPLayoutGrid@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPLayoutGrid::setRowSpacing(int)" (?setRowSpacing@QCPLayoutGrid@@QEAAXH@Z) referenced in function "public: virtual int __cdecl QCPLayoutGrid::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPLayoutGrid@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPGrid::setSubGridVisible(bool)" (?setSubGridVisible@QCPGrid@@QEAAX_N@Z) referenced in function "public: virtual int __cdecl QCPGrid::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPGrid@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPGrid::setAntialiasedSubGrid(bool)" (?setAntialiasedSubGrid@QCPGrid@@QEAAX_N@Z) referenced in function "public: virtual int __cdecl QCPGrid::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPGrid@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPGrid::setAntialiasedZeroLine(bool)" (?setAntialiasedZeroLine@QCPGrid@@QEAAX_N@Z) referenced in function "public: virtual int __cdecl QCPGrid::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPGrid@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPGrid::setPen(class QPen const &)" (?setPen@QCPGrid@@QEAAXAEBVQPen@@@Z) referenced in function "public: virtual int __cdecl QCPGrid::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPGrid@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPGrid::setSubGridPen(class QPen const &)" (?setSubGridPen@QCPGrid@@QEAAXAEBVQPen@@@Z) referenced in function "public: virtual int __cdecl QCPGrid::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPGrid@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPGrid::setZeroLinePen(class QPen const &)" (?setZeroLinePen@QCPGrid@@QEAAXAEBVQPen@@@Z) referenced in function "public: virtual int __cdecl QCPGrid::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPGrid@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: int __cdecl QCPAxis::tickLabelPadding(void)const " (?tickLabelPadding@QCPAxis@@QEBAHXZ) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: double __cdecl QCPAxis::tickLabelRotation(void)const " (?tickLabelRotation@QCPAxis@@QEBANXZ) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: enum QCPAxis::LabelSide __cdecl QCPAxis::tickLabelSide(void)const " (?tickLabelSide@QCPAxis@@QEBA?AW4LabelSide@1@XZ) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: class QString __cdecl QCPAxis::numberFormat(void)const " (?numberFormat@QCPAxis@@QEBA?AVQString@@XZ) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: int __cdecl QCPAxis::tickLengthIn(void)const " (?tickLengthIn@QCPAxis@@QEBAHXZ) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: int __cdecl QCPAxis::tickLengthOut(void)const " (?tickLengthOut@QCPAxis@@QEBAHXZ) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: int __cdecl QCPAxis::subTickLengthIn(void)const " (?subTickLengthIn@QCPAxis@@QEBAHXZ) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: int __cdecl QCPAxis::subTickLengthOut(void)const " (?subTickLengthOut@QCPAxis@@QEBAHXZ) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: int __cdecl QCPAxis::labelPadding(void)const " (?labelPadding@QCPAxis@@QEBAHXZ) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: int __cdecl QCPAxis::offset(void)const " (?offset@QCPAxis@@QEBAHXZ) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: class QCPLineEnding __cdecl QCPAxis::lowerEnding(void)const " (?lowerEnding@QCPAxis@@QEBA?AVQCPLineEnding@@XZ) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: class QCPLineEnding __cdecl QCPAxis::upperEnding(void)const " (?upperEnding@QCPAxis@@QEBA?AVQCPLineEnding@@XZ) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPAxis::setScaleType(enum QCPAxis::ScaleType)" (?setScaleType@QCPAxis@@QEAAXW4ScaleType@1@@Z) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPAxis::setScaleLogBase(double)" (?setScaleLogBase@QCPAxis@@QEAAXN@Z) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPAxis::setRange(class QCPRange const &)" (?setRange@QCPAxis@@QEAAXAEBVQCPRange@@@Z) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPAxis::setRangeReversed(bool)" (?setRangeReversed@QCPAxis@@QEAAX_N@Z) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPAxis::setAutoTicks(bool)" (?setAutoTicks@QCPAxis@@QEAAX_N@Z) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPAxis::setAutoTickCount(int)" (?setAutoTickCount@QCPAxis@@QEAAXH@Z) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPAxis::setAutoTickLabels(bool)" (?setAutoTickLabels@QCPAxis@@QEAAX_N@Z) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPAxis::setAutoTickStep(bool)" (?setAutoTickStep@QCPAxis@@QEAAX_N@Z) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPAxis::setAutoSubTicks(bool)" (?setAutoSubTicks@QCPAxis@@QEAAX_N@Z) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPAxis::setTicks(bool)" (?setTicks@QCPAxis@@QEAAX_N@Z) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPAxis::setTickLabels(bool)" (?setTickLabels@QCPAxis@@QEAAX_N@Z) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPAxis::setTickLabelPadding(int)" (?setTickLabelPadding@QCPAxis@@QEAAXH@Z) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAxis@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPAxis::setTickLabelType(enum QCPAxis::LabelType)" (?setTickLabelType@QCPAxis@@QEAAXW4LabelType@1@@Z) referenced in function "public: virtual int __cdecl QCPAxis::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QCPAbstractPlottable@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
moc_qcustomplot.obj : error LNK2019: unresolved external symbol "public: void __cdecl QCPAbstractPlottable::setValueAxis(class QCPAxis *)" (?setValueAxis@QCPAbstractPlottable@@QEAAXPEAVQCPAxis@@@Z) referenced in 

\Ann_network\bin\Makefile [debug] Error 2
    11:50:09: The process "L:\Qt\Qt5.5.0\Tools\QtCreator\bin\jom.exe" exited with code 2.
    Error while building/deploying project Ann_network (kit: Desktop Qt 5.5.0 MSVC2013 64bit)
    When executing step "Make"
    11:50:09: Elapsed time: 00:01.

注意:这是我的 .pro 文件的样子:

#-------------------------------------------------
#
# Project created by QtCreator 2015-09-18T10:56:00
#
#-------------------------------------------------

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport

TARGET = Ann_network
TEMPLATE = app


SOURCES += main.cpp\
        mainwindow.cpp \
        qcustomplot.cpp \
    ../../ArtificialNeuralNetworksProject/Layer.cpp \
    ../../ArtificialNeuralNetworksProject/Matrix.cpp \
    ../../ArtificialNeuralNetworksProject/Network.cpp \
    ../../ArtificialNeuralNetworksProject/Neuron.cpp


HEADERS  += mainwindow.h \
    ../../ArtificialNeuralNetworksProject/Layer.h \
    ../../ArtificialNeuralNetworksProject/Matrix.h \
    ../../ArtificialNeuralNetworksProject/Network.h \
    ../../ArtificialNeuralNetworksProject/Neuron.h \
    qcustomplot.h


FORMS    += mainwindow.ui

我怎样才能找出原因是什么。?

4

1 回答 1

1

我找到了摆脱这个令人伤脑筋的问题的方法。

首先尝试运行 qmake,如果没有帮助,只需删除.pro.user文件旁边的.pro文件。之后尝试打开您的项目,只需按重新配置即可。

如果您遇到 QMake 错误(缺少 qmake 或类似的东西),请先运行 qmake,然后您就可以开始了。

于 2015-09-24T09:53:56.740 回答