I am trying to add crypto++
library to Qt
project in QtCreator
IDE. I've made a mistake by adding crypto++
sources to project instead of adding .so library. Thus I've deleted crypto++
directory from qt projects to regain pre-crypto++ project state, which compiled and linked without problems. Before crypto++ I've also added QCustomPlot
and compiled and built the project without any errors.Now I cannot recompile and rebuild project anymore because of following errors:
我正在尝试在QtCreator IDE中向Qt项目添加crypto+库。我犯了一个错误,将加密+源添加到项目中,而不是添加。so库。因此,我从qt项目中删除了crypto+目录,以重新获得pre-crypto++项目状态,该状态编译和链接没有问题。在crypto++之前,我还添加了QCustomPlot并编译并构建了这个项目,没有出现任何错误。现在我无法重新编译和重建项目,因为有以下错误:
09:19:42: Running steps for project ueTestProject...
09:19:42: Configuration unchanged, skipping qmake step.
09:19:42: Starting: "/usr/bin/make"
g++ -Wl,-rpath,/opt/Qt/5.4/gcc_64 -Wl,-rpath,/opt/Qt/5.4/gcc_64/lib -o ueTestProject main.o cmainwindow.o ueborderlayout.o uecentralwidget.o qcustomplot.o uegraphwidget.o uetopmerchandisewidget.o uetopmerchandiseview.o uepossesttings.o -L/opt/Qt/5.4/gcc_64/lib -lQt5PrintSupport -lQt5Widgets -lQt5Gui -lQt5Sql -lQt5Core -lGL -lpthread
cmainwindow.o: In function `CMainWindow::CMainWindow(QWidget*)':
/home/developeruser/projects/ueTestProject/bin/../cmainwindow.cpp:4: undefined reference to `vtable for CMainWindow'
/home/developeruser/projects/ueTestProject/bin/../cmainwindow.cpp:4: undefined reference to `vtable for CMainWindow'
cmainwindow.o: In function `CMainWindow::~CMainWindow()':
/home/developeruser/projects/ueTestProject/bin/../cmainwindow.cpp:23: undefined reference to `vtable for CMainWindow'
/home/developeruser/projects/ueTestProject/bin/../cmainwindow.cpp:23: undefined reference to `vtable for CMainWindow'
uecentralwidget.o: In function `UeCentralWidget::UeCentralWidget(QWidget*)':
/home/developeruser/projects/ueTestProject/bin/../gui/uecentralwidget.cpp:4: undefined reference to `vtable for UeCentralWidget'
/home/developeruser/projects/ueTestProject/bin/../gui/uecentralwidget.cpp:4: undefined reference to `vtable for UeCentralWidget'
uecentralwidget.o: In function `UeCentralWidget::~UeCentralWidget()':
/home/developeruser/projects/ueTestProject/bin/../gui/uecentralwidget.cpp:22: undefined reference to `vtable for UeCentralWidget'
/home/developeruser/projects/ueTestProject/bin/../gui/uecentralwidget.cpp:22: undefined reference to `vtable for UeCentralWidget'
qcustomplot.o: In function `QCPLayer::QCPLayer(QCustomPlot*, QString const&)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:755: undefined reference to `vtable for QCPLayer'
qcustomplot.o: In function `QCPLayer::~QCPLayer()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:761: undefined reference to `vtable for QCPLayer'
qcustomplot.o: In function `QCPLayerable::QCPLayerable(QCustomPlot*, QString, QCPLayerable*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:937: undefined reference to `vtable for QCPLayerable'
qcustomplot.o: In function `QCPLayerable::~QCPLayerable()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:948: undefined reference to `vtable for QCPLayerable'
qcustomplot.o: In function `QCPLayerable::moveToLayer(QCPLayer*, bool)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:1147: undefined reference to `QCPLayerable::layerChanged(QCPLayer*)'
qcustomplot.o: In function `QCPMarginGroup::QCPMarginGroup(QCustomPlot*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:1561: undefined reference to `vtable for QCPMarginGroup'
qcustomplot.o: In function `QCPMarginGroup::~QCPMarginGroup()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:1569: undefined reference to `vtable for QCPMarginGroup'
qcustomplot.o: In function `QCPLayoutElement::QCPLayoutElement(QCustomPlot*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:1753: undefined reference to `vtable for QCPLayoutElement'
qcustomplot.o: In function `QCPLayoutElement::~QCPLayoutElement()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:1757: undefined reference to `vtable for QCPLayoutElement'
qcustomplot.o: In function `QCPLayout::QCPLayout()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:2139: undefined reference to `vtable for QCPLayout'
qcustomplot.o: In function `QCPLayoutGrid::QCPLayoutGrid()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:2501: undefined reference to `vtable for QCPLayoutGrid'
qcustomplot.o: In function `QCPLayoutGrid::~QCPLayoutGrid()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:2505: undefined reference to `vtable for QCPLayoutGrid'
qcustomplot.o: In function `QCPLayoutInset::QCPLayoutInset()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:3095: undefined reference to `vtable for QCPLayoutInset'
qcustomplot.o: In function `QCPLayoutInset::~QCPLayoutInset()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:3099: undefined reference to `vtable for QCPLayoutInset'
qcustomplot.o: In function `QCPGrid::QCPGrid(QCPAxis*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:3691: undefined reference to `vtable for QCPGrid'
qcustomplot.o: In function `QCPAxis::QCPAxis(QCPAxisRect*, QCPAxis::AxisType)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:4050: undefined reference to `vtable for QCPAxis'
qcustomplot.o: In function `QCPAxis::~QCPAxis()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:4075: undefined reference to `vtable for QCPAxis'
qcustomplot.o: In function `QCPAxis::setScaleType(QCPAxis::ScaleType)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:4181: undefined reference to `QCPAxis::scaleTypeChanged(QCPAxis::ScaleType)'
qcustomplot.o: In function `QCPAxis::setRange(QCPRange const&)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:4226: undefined reference to `QCPAxis::rangeChanged(QCPRange const&)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:4227: undefined reference to `QCPAxis::rangeChanged(QCPRange const&, QCPRange const&)'
qcustomplot.o: In function `QCPAxis::setSelectableParts(QFlags<QCPAxis::SelectablePart> const&)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:4245: undefined reference to `QCPAxis::selectableChanged(QFlags<QCPAxis::SelectablePart> const&)'
qcustomplot.o: In function `QCPAxis::setSelectedParts(QFlags<QCPAxis::SelectablePart> const&)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:4269: undefined reference to `QCPAxis::selectionChanged(QFlags<QCPAxis::SelectablePart> const&)'
qcustomplot.o: In function `QCPAxis::setRange(double, double)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:4299: undefined reference to `QCPAxis::rangeChanged(QCPRange const&)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:4300: undefined reference to `QCPAxis::rangeChanged(QCPRange const&, QCPRange const&)'
qcustomplot.o: In function `QCPAxis::setRangeLower(double)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:4343: undefined reference to `QCPAxis::rangeChanged(QCPRange const&)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:4344: undefined reference to `QCPAxis::rangeChanged(QCPRange const&, QCPRange const&)'
qcustomplot.o: In function `QCPAxis::setRangeUpper(double)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:4366: undefined reference to `QCPAxis::rangeChanged(QCPRange const&)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:4367: undefined reference to `QCPAxis::rangeChanged(QCPRange const&, QCPRange const&)'
qcustomplot.o: In function `QCPAxis::moveRange(double)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:5168: undefined reference to `QCPAxis::rangeChanged(QCPRange const&)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:5169: undefined reference to `QCPAxis::rangeChanged(QCPRange const&, QCPRange const&)'
qcustomplot.o: In function `QCPAxis::scaleRange(double, double)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:5201: undefined reference to `QCPAxis::rangeChanged(QCPRange const&)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:5202: undefined reference to `QCPAxis::rangeChanged(QCPRange const&, QCPRange const&)'
qcustomplot.o: In function `QCPAxis::setupTickVectors()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:5530: undefined reference to `QCPAxis::ticksRequest()'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:5595: undefined reference to `QCPAxis::ticksRequest()'
qcustomplot.o: In function `QCPAbstractPlottable::QCPAbstractPlottable(QCPAxis*, QCPAxis*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:6853: undefined reference to `vtable for QCPAbstractPlottable'
qcustomplot.o: In function `QCPAbstractPlottable::setSelectable(bool)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:7000: undefined reference to `QCPAbstractPlottable::selectableChanged(bool)'
qcustomplot.o: In function `QCPAbstractPlottable::setSelected(bool)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:7023: undefined reference to `QCPAbstractPlottable::selectionChanged(bool)'
qcustomplot.o: In function `QCPAbstractItem::QCPAbstractItem(QCustomPlot*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:8359: undefined reference to `vtable for QCPAbstractItem'
qcustomplot.o: In function `QCPAbstractItem::~QCPAbstractItem()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:8369: undefined reference to `vtable for QCPAbstractItem'
qcustomplot.o: In function `QCPAbstractItem::setSelectable(bool)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:8421: undefined reference to `QCPAbstractItem::selectableChanged(bool)'
qcustomplot.o: In function `QCPAbstractItem::setSelected(bool)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:8444: undefined reference to `QCPAbstractItem::selectionChanged(bool)'
qcustomplot.o: In function `QCustomPlot::QCustomPlot(QWidget*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:9056: undefined reference to `vtable for QCustomPlot'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:9056: undefined reference to `vtable for QCustomPlot'
qcustomplot.o: In function `QCustomPlot::~QCustomPlot()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:9106: undefined reference to `vtable for QCustomPlot'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:9106: undefined reference to `vtable for QCustomPlot'
qcustomplot.o: In function `QCustomPlot::replot(QCustomPlot::RefreshPriority)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10384: undefined reference to `QCustomPlot::beforeReplot()'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10403: undefined reference to `QCustomPlot::afterReplot()'
qcustomplot.o: In function `QCustomPlot::mouseDoubleClickEvent(QMouseEvent*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10700: undefined reference to `QCustomPlot::mouseDoubleClick(QMouseEvent*)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10707: undefined reference to `QCustomPlot::plottableDoubleClick(QCPAbstractPlottable*, QMouseEvent*)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10709: undefined reference to `QCustomPlot::axisDoubleClick(QCPAxis*, QCPAxis::SelectablePart, QMouseEvent*)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10711: undefined reference to `QCustomPlot::itemDoubleClick(QCPAbstractItem*, QMouseEvent*)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10713: undefined reference to `QCustomPlot::legendDoubleClick(QCPLegend*, QCPAbstractLegendItem*, QMouseEvent*)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10715: undefined reference to `QCustomPlot::legendDoubleClick(QCPLegend*, QCPAbstractLegendItem*, QMouseEvent*)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10717: undefined reference to `QCustomPlot::titleDoubleClick(QMouseEvent*, QCPPlotTitle*)'
qcustomplot.o: In function `QCustomPlot::mousePressEvent(QMouseEvent*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10742: undefined reference to `QCustomPlot::mousePress(QMouseEvent*)'
qcustomplot.o: In function `QCustomPlot::mouseMoveEvent(QMouseEvent*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10764: undefined reference to `QCustomPlot::mouseMove(QMouseEvent*)'
qcustomplot.o: In function `QCustomPlot::mouseReleaseEvent(QMouseEvent*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10789: undefined reference to `QCustomPlot::mouseRelease(QMouseEvent*)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10826: undefined reference to `QCustomPlot::selectionChangedByUser()'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10833: undefined reference to `QCustomPlot::plottableClick(QCPAbstractPlottable*, QMouseEvent*)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10835: undefined reference to `QCustomPlot::axisClick(QCPAxis*, QCPAxis::SelectablePart, QMouseEvent*)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10837: undefined reference to `QCustomPlot::itemClick(QCPAbstractItem*, QMouseEvent*)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10839: undefined reference to `QCustomPlot::legendClick(QCPLegend*, QCPAbstractLegendItem*, QMouseEvent*)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10841: undefined reference to `QCustomPlot::legendClick(QCPLegend*, QCPAbstractLegendItem*, QMouseEvent*)'
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10843: undefined reference to `QCustomPlot::titleClick(QMouseEvent*, QCPPlotTitle*)'
qcustomplot.o: In function `QCustomPlot::wheelEvent(QWheelEvent*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:10867: undefined reference to `QCustomPlot::mouseWheel(QWheelEvent*)'
qcustomplot.o: In function `QCPAxisRect::QCPAxisRect(QCustomPlot*, bool)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:11749: undefined reference to `vtable for QCPAxisRect'
qcustomplot.o: In function `QCPAxisRect::~QCPAxisRect()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:11783: undefined reference to `vtable for QCPAxisRect'
qcustomplot.o: In function `QCPAbstractLegendItem::QCPAbstractLegendItem(QCPLegend*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:12668: undefined reference to `vtable for QCPAbstractLegendItem'
qcustomplot.o: In function `QCPAbstractLegendItem::setSelectable(bool)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:12726: undefined reference to `QCPAbstractLegendItem::selectableChanged(bool)'
qcustomplot.o: In function `QCPAbstractLegendItem::setSelected(bool)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:12743: undefined reference to `QCPAbstractLegendItem::selectionChanged(bool)'
qcustomplot.o: In function `QCPPlottableLegendItem::QCPPlottableLegendItem(QCPLegend*, QCPAbstractPlottable*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:12838: undefined reference to `vtable for QCPPlottableLegendItem'
qcustomplot.o: In function `QCPLegend::QCPLegend()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:12966: undefined reference to `vtable for QCPLegend'
qcustomplot.o: In function `QCPLegend::~QCPLegend()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:12989: undefined reference to `vtable for QCPLegend'
qcustomplot.o: In function `QCPLegend::setSelectableParts(QFlags<QCPLegend::SelectablePart> const&)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:13122: undefined reference to `QCPLegend::selectableChanged(QFlags<QCPLegend::SelectablePart>)'
qcustomplot.o: In function `QCPLegend::setSelectedParts(QFlags<QCPLegend::SelectablePart> const&)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:13168: undefined reference to `QCPLegend::selectionChanged(QFlags<QCPLegend::SelectablePart>)'
qcustomplot.o: In function `QCPPlotTitle::QCPPlotTitle(QCustomPlot*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:13536: undefined reference to `vtable for QCPPlotTitle'
qcustomplot.o: In function `QCPPlotTitle::QCPPlotTitle(QCustomPlot*, QString const&)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:13559: undefined reference to `vtable for QCPPlotTitle'
qcustomplot.o: In function `QCPPlotTitle::setSelectable(bool)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:13626: undefined reference to `QCPPlotTitle::selectableChanged(bool)'
qcustomplot.o: In function `QCPPlotTitle::setSelected(bool)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:13642: undefined reference to `QCPPlotTitle::selectionChanged(bool)'
qcustomplot.o: In function `QCPColorScale::QCPColorScale(QCustomPlot*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:13841: undefined reference to `vtable for QCPColorScale'
qcustomplot.o: In function `QCPColorScale::~QCPColorScale()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:13848: undefined reference to `vtable for QCPColorScale'
qcustomplot.o: In function `QCPColorScale::setDataRange(QCPRange const&)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:13957: undefined reference to `QCPColorScale::dataRangeChanged(QCPRange)'
qcustomplot.o: In function `QCPColorScale::setDataScaleType(QCPAxis::ScaleType)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:13980: undefined reference to `QCPColorScale::dataScaleTypeChanged(QCPAxis::ScaleType)'
qcustomplot.o: In function `QCPColorScale::setGradient(QCPColorGradient const&)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:13998: undefined reference to `QCPColorScale::gradientChanged(QCPColorGradient)'
qcustomplot.o: In function `QCPColorScaleAxisRectPrivate::QCPColorScaleAxisRectPrivate(QCPColorScale*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:14253: undefined reference to `vtable for QCPColorScaleAxisRectPrivate'
qcustomplot.o: In function `QCPGraph::QCPGraph(QCPAxis*, QCPAxis*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:14502: undefined reference to `vtable for QCPGraph'
qcustomplot.o: In function `QCPGraph::~QCPGraph()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:14520: undefined reference to `vtable for QCPGraph'
qcustomplot.o: In function `QCPCurve::QCPCurve(QCPAxis*, QCPAxis*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:16806: undefined reference to `vtable for QCPCurve'
qcustomplot.o: In function `QCPCurve::~QCPCurve()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:16822: undefined reference to `vtable for QCPCurve'
qcustomplot.o: In function `QCPBarsGroup::QCPBarsGroup(QCustomPlot*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:18068: undefined reference to `vtable for QCPBarsGroup'
qcustomplot.o: In function `QCPBarsGroup::~QCPBarsGroup()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:18072: undefined reference to `vtable for QCPBarsGroup'
qcustomplot.o: In function `QCPBars::QCPBars(QCPAxis*, QCPAxis*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:18444: undefined reference to `vtable for QCPBars'
qcustomplot.o: In function `QCPBars::~QCPBars()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:18457: undefined reference to `vtable for QCPBars'
qcustomplot.o: In function `QCPStatisticalBox::QCPStatisticalBox(QCPAxis*, QCPAxis*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:19187: undefined reference to `vtable for QCPStatisticalBox'
qcustomplot.o: In function `QCPColorMap::QCPColorMap(QCPAxis*, QCPAxis*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:20074: undefined reference to `vtable for QCPColorMap'
qcustomplot.o: In function `QCPColorMap::~QCPColorMap()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:20078: undefined reference to `vtable for QCPColorMap'
qcustomplot.o: In function `QCPColorMap::setDataRange(QCPRange const&)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:20126: undefined reference to `QCPColorMap::dataRangeChanged(QCPRange)'
qcustomplot.o: In function `QCPColorMap::setDataScaleType(QCPAxis::ScaleType)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:20141: undefined reference to `QCPColorMap::dataScaleTypeChanged(QCPAxis::ScaleType)'
qcustomplot.o: In function `QCPColorMap::setGradient(QCPColorGradient const&)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:20164: undefined reference to `QCPColorMap::gradientChanged(QCPColorGradient)'
qcustomplot.o: In function `QCPFinancial::QCPFinancial(QCPAxis*, QCPAxis*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:20574: undefined reference to `vtable for QCPFinancial'
qcustomplot.o: In function `QCPFinancial::~QCPFinancial()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:20582: undefined reference to `vtable for QCPFinancial'
qcustomplot.o: In function `QCPItemStraightLine::QCPItemStraightLine(QCustomPlot*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:21404: undefined reference to `vtable for QCPItemStraightLine'
qcustomplot.o: In function `QCPItemStraightLine::~QCPItemStraightLine()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:21413: undefined reference to `vtable for QCPItemStraightLine'
qcustomplot.o: In function `QCPItemLine::QCPItemLine(QCustomPlot*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:21594: undefined reference to `vtable for QCPItemLine'
qcustomplot.o: In function `QCPItemLine::~QCPItemLine()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:21603: undefined reference to `vtable for QCPItemLine'
qcustomplot.o: In function `QCPItemCurve::QCPItemCurve(QCustomPlot*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:21829: undefined reference to `vtable for QCPItemCurve'
qcustomplot.o: In function `QCPItemCurve::~QCPItemCurve()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:21840: undefined reference to `vtable for QCPItemCurve'
qcustomplot.o: In function `QCPItemRect::QCPItemRect(QCustomPlot*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:21983: undefined reference to `vtable for QCPItemRect'
qcustomplot.o: In function `QCPItemRect::~QCPItemRect()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:21994: undefined reference to `vtable for QCPItemRect'
qcustomplot.o: In function `QCPItemText::QCPItemText(QCustomPlot*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:22142: undefined reference to `vtable for QCPItemText'
qcustomplot.o: In function `QCPItemText::~QCPItemText()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:22159: undefined reference to `vtable for QCPItemText'
qcustomplot.o: In function `QCPItemEllipse::QCPItemEllipse(QCustomPlot*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:22482: undefined reference to `vtable for QCPItemEllipse'
qcustomplot.o: In function `QCPItemEllipse::~QCPItemEllipse()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:22493: undefined reference to `vtable for QCPItemEllipse'
qcustomplot.o: In function `QCPItemPixmap::QCPItemPixmap(QCustomPlot*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:22669: undefined reference to `vtable for QCPItemPixmap'
qcustomplot.o: In function `QCPItemPixmap::~QCPItemPixmap()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:22679: undefined reference to `vtable for QCPItemPixmap'
qcustomplot.o: In function `QCPItemTracer::QCPItemTracer(QCustomPlot*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:22922: undefined reference to `vtable for QCPItemTracer'
qcustomplot.o: In function `QCPItemTracer::~QCPItemTracer()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:22936: undefined reference to `vtable for QCPItemTracer'
qcustomplot.o: In function `QCPItemBracket::QCPItemBracket(QCustomPlot*)':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:23276: undefined reference to `vtable for QCPItemBracket'
qcustomplot.o: In function `QCPItemBracket::~QCPItemBracket()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.cpp:23287: undefined reference to `vtable for QCPItemBracket'
qcustomplot.o: In function `QCPLayout::~QCPLayout()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.h:719: undefined reference to `vtable for QCPLayout'
qcustomplot.o: In function `QCPAbstractPlottable::~QCPAbstractPlottable()':
/home/developeruser/projects/ueTestProject/bin/../plot/qcustomplot.h:1388: undefined reference to `vtable for QCPAbstractPlottable'
qcustomplot.o: In function `QCPLayout* qobject_cast<QCPLayout*>(QObject*)':
/opt/Qt/5.4/gcc_64/include/QtCore/qobject.h:520: undefined reference to `QCPLayout::staticMetaObject'
qcustomplot.o: In function `QCPGraph* qobject_cast<QCPGraph*>(QObject*)':
These are only some of errors, because I cannot paste them all because of 30000 chars limitation of stack overflow. Here is also .pro
file:
这些只是一些错误,因为我不能全部粘贴,因为栈溢出的30000字符限制。这里还有。pro文件:
#-------------------------------------------------
#
# Project created by QtCreator 2015-02-16T15:51:38
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport sql
TARGET = ueTestProject
TEMPLATE = app
SOURCES += main.cpp\
cmainwindow.cpp \
layouts/ueborderlayout.cpp \
gui/uecentralwidget.cpp \
plot/qcustomplot.cpp \
gui/uegraphwidget.cpp \
gui/uetopmerchandisewidget.cpp \
gui/uetopmerchandiseview.cpp \
settings/uepossesttings.cpp \
What did break up?
打破了什么?
4 个解决方案
#1
3
It seems those errors are caused because the compiler can't find the code that is supposed to be generated by the Qt pre-compiler (MOC). Maybe you still have "trash" from your previous .pro configuration.
这些错误似乎是由于编译器找不到Qt预编译器(MOC)应该生成的代码而引起的。也许您仍然有以前.pro配置中的“trash”。
It's recommended you clean and recompile the project after you change the .pro file. You can read more about it at Using the Meta-Object Compiler (moc).
建议您在更改.pro文件之后清理并重新编译项目。您可以在使用元对象编译器(moc)时了解更多。
You can try this inside QtCreator:
你可以在QtCreator内部尝试:
Build > Clean All
Build > Run qmake
Build > Build All
#2
1
I've deleted whole project (after backing up it up), created new project with same name, added headers and sources in same hierarchy and now works ok! The reason headers were not seen in the project that in .pro
file HEADERS
section was somehow deleted.
我已经删除了整个项目(在备份之后),创建了同名的新项目,在相同的层次结构中添加了标题和源代码,现在可以了!在项目中没有看到标头的原因是。pro文件标头部分以某种方式被删除。
#3
1
I solved this by adding the include file itself to the project.
我通过将include文件本身添加到项目中来解决这个问题。
So the headers section should also contain qcustomplot.h
因此,header部分也应该包含qcustomplot.h。
Obviously with standard C/C++ compilers (MSVC++ gcc etc.) you don't need to explicitly make the compiler aware of the header, as long as the containing folder is specified. Qt obviously does some extra magic.
显然,使用标准的C/ c++编译器(MSVC++ gcc等),只要指定了包含的文件夹,就不需要显式地让编译器知道标题。Qt显然有一些额外的魔力。
#4
0
You can close QtCreator, remove .pro.user file and Makefile and all other file except source and header files. Then open and configure project again via QtCreator
您可以关闭QtCreator,删除.pro。用户文件和Makefile以及除源文件和头文件之外的所有其他文件。然后通过QtCreator再次打开并配置项目
#1
3
It seems those errors are caused because the compiler can't find the code that is supposed to be generated by the Qt pre-compiler (MOC). Maybe you still have "trash" from your previous .pro configuration.
这些错误似乎是由于编译器找不到Qt预编译器(MOC)应该生成的代码而引起的。也许您仍然有以前.pro配置中的“trash”。
It's recommended you clean and recompile the project after you change the .pro file. You can read more about it at Using the Meta-Object Compiler (moc).
建议您在更改.pro文件之后清理并重新编译项目。您可以在使用元对象编译器(moc)时了解更多。
You can try this inside QtCreator:
你可以在QtCreator内部尝试:
Build > Clean All
Build > Run qmake
Build > Build All
#2
1
I've deleted whole project (after backing up it up), created new project with same name, added headers and sources in same hierarchy and now works ok! The reason headers were not seen in the project that in .pro
file HEADERS
section was somehow deleted.
我已经删除了整个项目(在备份之后),创建了同名的新项目,在相同的层次结构中添加了标题和源代码,现在可以了!在项目中没有看到标头的原因是。pro文件标头部分以某种方式被删除。
#3
1
I solved this by adding the include file itself to the project.
我通过将include文件本身添加到项目中来解决这个问题。
So the headers section should also contain qcustomplot.h
因此,header部分也应该包含qcustomplot.h。
Obviously with standard C/C++ compilers (MSVC++ gcc etc.) you don't need to explicitly make the compiler aware of the header, as long as the containing folder is specified. Qt obviously does some extra magic.
显然,使用标准的C/ c++编译器(MSVC++ gcc等),只要指定了包含的文件夹,就不需要显式地让编译器知道标题。Qt显然有一些额外的魔力。
#4
0
You can close QtCreator, remove .pro.user file and Makefile and all other file except source and header files. Then open and configure project again via QtCreator
您可以关闭QtCreator,删除.pro。用户文件和Makefile以及除源文件和头文件之外的所有其他文件。然后通过QtCreator再次打开并配置项目