This is the next problem and the solution seems to be.
https://stackoverflow.com/questions/27747986/undefined-reference-to-main-for-shared-library moc C:/msys64/home/admin/librepilot/ground/gcs/src/plugins/scope/scopegadgetconfiguration.h
compiling moc_scopegadgetconfiguration.cpp
moc C:/msys64/home/admin/librepilot/ground/gcs/src/plugins/scope/scopegadget.h
compiling moc_scopegadget.cpp
moc C:/msys64/home/admin/librepilot/ground/gcs/src/plugins/scope/scopegadgetwidget.h
compiling moc_scopegadgetwidget.cpp
moc C:/msys64/home/admin/librepilot/ground/gcs/src/plugins/scope/scopegadgetfactory.h
compiling moc_scopegadgetfactory.cpp
linking ../../../lib/librepilot-gcs/plugins/LibrePilot/ScopeGadget.dll
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plotdata.o:plotdata.cpp:(.text+0xb5): undefined reference to `QwtPlotMarker::QwtPlotMarker(QString const&)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plotdata.o:plotdata.cpp:(.text+0xd5): undefined reference to `QwtPlotItem::setZ(double)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plotdata.o:plotdata.cpp:(.text+0x11e): undefined reference to `QwtText::QwtText(QString const&, QwtText::TextFormat)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plotdata.o:plotdata.cpp:(.text+0x191): undefined reference to `QwtText::setColor(QColor const&)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plotdata.o:plotdata.cpp:(.text+0x210): undefined reference to `QwtText::setBorderPen(QPen const&)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plotdata.o:plotdata.cpp:(.text+0x23d): undefined reference to `QwtText::setBorderRadius(double)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plotdata.o:plotdata.cpp:(.text+0x274): undefined reference to `QwtText::setBackgroundBrush(QBrush const&)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plotdata.o:plotdata.cpp:(.text+0x284): undefined reference to `QwtText::font() const'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plotdata.o:plotdata.cpp:(.text+0x29d): undefined reference to `QwtText::setFont(QFont const&)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plotdata.o:plotdata.cpp:(.text+0x2a8): undefined reference to `QwtPlotMarker::setLabel(QwtText const&)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plotdata.o:plotdata.cpp:(.text+0x2b3): undefined reference to `QwtPlotItem::setTitle(QString const&)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plotdata.o:plotdata.cpp:(.text+0x2c0): undefined reference to `QwtPlotMarker::setLabelOrientation(Qt::Orientation)'
.....
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: moc_scopegadgetwidget.o:moc_scopegadgetwidget.cpp:(.rdata$_ZTV17ScopeGadgetWidget[_ZTV17ScopeGadgetWidget]+0x88): undefined reference to `QwtPlot::minimumSizeHint() const'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: moc_scopegadgetwidget.o:moc_scopegadgetwidget.cpp:(.rdata$_ZTV17ScopeGadgetWidget[_ZTV17ScopeGadgetWidget]+0x110): undefined reference to `QwtPlot::resizeEvent(QResizeEvent*)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: moc_scopegadgetwidget.o:moc_scopegadgetwidget.cpp:(.rdata$_ZTV17ScopeGadgetWidget[_ZTV17ScopeGadgetWidget]+0x1b0): undefined reference to `QwtPlot::canvasMap(int) const'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: moc_scopegadgetwidget.o:moc_scopegadgetwidget.cpp:(.rdata$_ZTV17ScopeGadgetWidget[_ZTV17ScopeGadgetWidget]+0x1b8): undefined reference to `QwtPlot::updateLayout()'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: moc_scopegadgetwidget.o:moc_scopegadgetwidget.cpp:(.rdata$_ZTV17ScopeGadgetWidget[_ZTV17ScopeGadgetWidget]+0x1c0): undefined reference to `QwtPlot::drawCanvas(QPainter*)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: moc_scopegadgetwidget.o:moc_scopegadgetwidget.cpp:(.rdata$_ZTV17ScopeGadgetWidget[_ZTV17ScopeGadgetWidget]+0x1c8): undefined reference to `QwtPlot::getCanvasMarginsHint(QwtScaleMap const*, QRectF const&, double&, double&, double&, double&) const'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: moc_scopegadgetwidget.o:moc_scopegadgetwidget.cpp:(.rdata$_ZTV17ScopeGadgetWidget[_ZTV17ScopeGadgetWidget]+0x1d0): undefined reference to `QwtPlot::drawItems(QPainter*, QRectF const&, QwtScaleMap const*) const'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: moc_scopegadgetwidget.o:moc_scopegadgetwidget.cpp:(.rdata$_ZTV17ScopeGadgetWidget[_ZTV17ScopeGadgetWidget]+0x1d8): undefined reference to `QwtPlot::itemToInfo(QwtPlotItem*) const'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: moc_scopegadgetwidget.o:moc_scopegadgetwidget.cpp:(.rdata$_ZTV17ScopeGadgetWidget[_ZTV17ScopeGadgetWidget]+0x1e0): undefined reference to `QwtPlot::infoToItem(QVariant const&) const'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: moc_scopegadgetwidget.o:moc_scopegadgetwidget.cpp:(.rdata$_ZTV17ScopeGadgetWidget[_ZTV17ScopeGadgetWidget]+0x1e8): undefined reference to `QwtPlot::replot()'
collect2.exe: error: ld returned 1 exit status
mingw32-make[4]: *** [Makefile:107: ../../../lib/librepilot-gcs/plugins/LibrePilot/ScopeGadget.dll] Error 1
mingw32-make[4]: Leaving directory 'C:/msys64/home/admin/librepilot/build/librepilot-gcs_release/src/plugins/scope'
mingw32-make[3]: *** [Makefile:342: sub-scope-make_first] Error 2
mingw32-make[3]: Leaving directory 'C:/msys64/home/admin/librepilot/build/librepilot-gcs_release/src/plugins'
mingw32-make[2]: *** [Makefile:139: sub-plugins-make_first-ordered] Error 2
mingw32-make[2]: Leaving directory 'C:/msys64/home/admin/librepilot/build/librepilot-gcs_release/src'
mingw32-make[1]: *** [Makefile:52: sub-src-make_first-ordered] Error 2
mingw32-make[1]: Leaving directory 'C:/msys64/home/admin/librepilot/build/librepilot-gcs_release'
mingw32-make: *** [Makefile:308: gcs] Error 2