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
> recurring
> 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 5.8.

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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to