[Interest] QT_WARNING_DISABLE_DEPRECATED, QT_INIT_METAOBJECT does not name a type
thiago.macieira at intel.com
Mon May 15 19:15:35 CEST 2023
On Monday, 15 May 2023 15:37:12 PDT Tamás Nagy wrote:
> If I start the cross compilation with the build-script.sh, it throws random
> errors containing: "QT_WARNING_DISABLE_DEPRECATED does not name a type",
> "QT_INIT_METAOBJECT does not name a type" for the generated
> moc_myprogram.cpp as the moc-compiler is running. Through the
> cross-compilation script it comes to an error
> that can be a missing library linkage. But in which .lib or .so are those
> QT_WARNING_DISABLE_DEPRECATED? What should I add to the library linkage?
Nitpick: the errors are neither thrown (they are not exceptions) nor are
random (there is a pattern, even if you can't discern it).
QT_WARNING_DISABLE_DEPRECATED is a macro from qcompilerdetection.h, which is
included by qglobal.h, which means it's always defined. It's been there since
QT_INIT_METAOBJECT is similarly in qglobal.h and was there from 5.10.1 to 6.0,
when the design flaw that required the macro in Windows systems was fixed.
Because those are macros, they won't be in any .lib, .a or .so. They are in
headers; adding libraries to the linking will not solve anything because you
have not reached the linking step yet.
If it were just the latter error, I'd guess that you're trying to use a Qt5-
generated moc output with Qt 6 headers, but the former error implies that is
not a good hypothesis. Something else is afoot.
I doubt that these are the first errors. Please run the build again and attach
the full output from the compiler. Please also include the full compiler
command-line that was executed printed by make or ninja -v.
Thiago Macieira - thiago.macieira (AT) intel.com
Cloud Software Architect - Intel DCAI Cloud Engineering
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5152 bytes
Desc: not available
More information about the Interest