Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ludovicaelbrecht opened this issue Apr 13, 2021 · 4 comments

Comments

@ludovicaelbrecht
Copy link

ludovicaelbrecht commented Apr 13, 2021

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
Copy link
Author

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
Copy link

Worked for me on Fedora 33 too.

@whoozle
Copy link
Owner

whoozle commented Apr 21, 2021

what Qt version do you have?

@JRDetwiler
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants