0

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

dja
  • 53
  • 6
  • does `QGroundControl` support qt 5.13 .. did you try with supported version .. I think 5.10 – Mohammad Kanan Aug 06 '21 at 01:12
  • yes i tried for the version of Qt it's version 5.12.6, this version compiles for the release 3.5.6 but not for the new versions should i ask for a review ? – dja Aug 09 '21 at 08:29

1 Answers1

0

You've got a couple of things going on here:

  1. 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.

  2. 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.

Jeremy Friesner
  • 70,199
  • 15
  • 131
  • 234