Trying to compile lyx2.4 with g++-12, QT6, cmake

Kornel Benko kornel at lyx.org
Sat Sep 17 11:17:30 UTC 2022


I got this error:
/usr2/src/lyx/lyx-git/src/frontends/qt/GuiApplication.h:123:22: error: ‘virtual bool
lyx::frontend::GuiApplication::nativeEventFilter(const QByteArray&, void*, long int*)’
marked ‘override’, but does not override 123 |         virtual bool
nativeEventFilter(const QByteArray & eventType, void * message, |
^~~~~~~~~~~~~~~~~


Removing the 'override' follows the next error:
/usr2/src/lyx/lyx-git/src/frontends/qt/GuiApplication.cpp: In function
‘lyx::frontend::Application* lyx::createApplication(int&, char**)’:
/usr2/src/lyx/lyx-git/src/frontends/qt/GuiApplication.cpp:231:84: error: invalid
new-expression of abstract class type ‘lyx::frontend::GuiApplication’ 231 |
frontend::GuiApplication * guiApp = new frontend::GuiApplication(argc, argv); |
                                                                         ^ In file
included from /usr2/src/lyx/lyx-git/src/frontends/qt/GuiApplication.cpp:15:
/usr2/src/lyx/lyx-git/src/frontends/qt/GuiApplication.h:55:7: note:   because the
following virtual functions are pure within ‘lyx::frontend::GuiApplication’: 55 | class
GuiApplication : public QApplication, public Application |       ^~~~~~~~~~~~~~ In file
included from /usr/include/x86_64-linux-gnu/qt6/QtCore/QAbstractNativeEventFilter:1, from
/usr2/src/lyx/lyx-git/src/frontends/qt/GuiApplication.h:24, from
/usr2/src/lyx/lyx-git/src/frontends/qt/GuiApplication.cpp:15:
/usr/include/x86_64-linux-gnu/qt6/QtCore/qabstractnativeeventfilter.h:55:18: note:
‘virtual bool QAbstractNativeEventFilter::nativeEventFilter(const QByteArray&, void*,
qintptr*)’ 55 |     virtual bool nativeEventFilter(const QByteArray &eventType, void
*message, qintptr *result) = 0; |                  ^~~~~~~~~~~~~~~~~


The error does not show using automake.

Do we need to set QPA_XCB?

	Kornel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220917/0faeed3e/attachment.asc>


More information about the lyx-devel mailing list