whoozle / android-file-transfer-linux

Android File Transfer for Linux (and macOS!)
http://whoozle.github.io/android-file-transfer-linux/
GNU Lesser General Public License v2.1
1.47k stars 120 forks source link

compile error: ‘int DevicesDialog::exec()’ marked ‘override’, but does not override #268

Closed ludovicaelbrecht closed 3 years ago

ludovicaelbrecht commented 3 years ago

I'm installing a new machine (running Fedora 34) and just did git clone of the repo, ran cmake fine, but make fails with this error:

[ 70%] Building CXX object qt/CMakeFiles/android-file-transfer.dir/main.cpp.o [ 72%] Building CXX object qt/CMakeFiles/android-file-transfer.dir/mainwindow.cpp.o In file included from /usr/src/local-builds/android-file-transfer-linux/qt/mainwindow.cpp:28: /usr/src/local-builds/android-file-transfer-linux/qt/devicesdialog.h:35:13: error: ‘int DevicesDialog::exec()’ marked ‘override’, but does not override 35 | int exec() override; | ^~~~ make[2]: [qt/CMakeFiles/android-file-transfer.dir/build.make:199: qt/CMakeFiles/android-file-transfer.dir/mainwindow.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:266: qt/CMakeFiles/android-file-transfer.dir/all] Error 2 make: *** [Makefile:149: all] Error 2

On my other laptop (running Fedora 33) everything builds just fine. The main difference I can see: the laptop where it works uses gcc & cpp version 10, whereas the one where it fails is running gcc & cpp v11.

ludovicaelbrecht commented 3 years ago

Simply removing the 'override' keyword on line 35 of android-file-transfer-linux/qt/devicesdialog.h allows it to compile on my Fedora 34.

JRDetwiler commented 3 years ago

Worked for me on Fedora 33 too.

whoozle commented 3 years ago

what Qt version do you have?

JRDetwiler commented 3 years ago

what Qt version do you have?

Could you suggest how to look that up? Seems like I have quite a number of Qt packages installed.