Hello I cloned the repository of QGround Control (open source application link, However the version on Github does not compile with Qt, I use version 5.12.6 as specified on the support (link), the build environment I chose is Destop Qt 5.12.6 clang 64bit here are the errors (I think the errors come from a bad installation or set-up of Qt Creator):
Qt5.12.6/5.12.6/clang_64/lib/QtCore.framework/Headers/qvariant.h:399: error: definition of implicit copy assignment operator for 'Private' is deprecated because it has a user-declared copy constructor [-Werror,-Wdeprecated-copy]
inline Private(const Private &other) Q_DECL_NOTHROW
^
Please note that I am using MacOs 11.2.3.
The version of Qt creator: 4.10.2 based on 5.13.2
You've got a couple of things going on here:
You are compiling with a more recent compiler, in which various previously-kosher practices (like declaring a copy-constructor without also declaring an assignment-operator) are now considered deprecated, causing the compiler to issue a warning about them.
You're compiling with
-Werror
, which causes the compiler to treat all warnings as errors. This, in conjunction with Qt headers that have not been updated to be latest-and-greatest-compiler-friendly and therefore produce warnings, is causing your compile to error out.I think the easy fix is to find where in your project-settings it is that
-Werror
is being specified, and remove it; then the code should (hopefully) compile successfully despite any warnings the compiler might emit.