QT6.6.1 Compile Error: Could not find feature c++11
-
Hi,
I am using Ubuntu 22.04. I want to compile qgamepad for Qt 6.6.1. I compiled it for 6.5.3 before and I'm still using it on same PC. I am using this repo : https://github.com/qt/qtgamepad
When I try it in Qt 6.6.1, I get an error like the one below.Can anyone help?
My command : /opt/Qt/6.6.1/gcc_64/bin/qmake -r ./qtgamepad.pro
Output:
Running configuration tests... Done running configuration tests. Configure summary: Qt Gamepad: SDL2 ................................... yes Qt is now configured for building. Just run 'make'. Once everything is built, you must run 'make install'. Qt will be installed into '/opt/Qt/6.6.1/gcc_64'. Prior to reconfiguration, make sure you remove any leftovers from the previous build. Reading /home/hmk01/qtgamepad/src/src.pro Reading /home/hmk01/qtgamepad/src/gamepad/gamepad.pro Project ERROR: Could not find feature c++11.```
-
Hi,
I am using Ubuntu 22.04. I want to compile qgamepad for Qt 6.6.1. I compiled it for 6.5.3 before and I'm still using it on same PC. I am using this repo : https://github.com/qt/qtgamepad
When I try it in Qt 6.6.1, I get an error like the one below.Can anyone help?
My command : /opt/Qt/6.6.1/gcc_64/bin/qmake -r ./qtgamepad.pro
Output:
Running configuration tests... Done running configuration tests. Configure summary: Qt Gamepad: SDL2 ................................... yes Qt is now configured for building. Just run 'make'. Once everything is built, you must run 'make install'. Qt will be installed into '/opt/Qt/6.6.1/gcc_64'. Prior to reconfiguration, make sure you remove any leftovers from the previous build. Reading /home/hmk01/qtgamepad/src/src.pro Reading /home/hmk01/qtgamepad/src/gamepad/gamepad.pro Project ERROR: Could not find feature c++11.```
@osos11 do not install Qt to
/opt
if you can avoid it, it often causes trouble. Use your home directory instead, it makes handling various Qt versions much easier.The module you mention clearly states it is for Qt 5, not Qt 6 so that might be the reason for build failure. Qt 5 was using
qmake
to build modules, but Qt 6 usescmake
. It is a big change. -
@osos11 do not install Qt to
/opt
if you can avoid it, it often causes trouble. Use your home directory instead, it makes handling various Qt versions much easier.The module you mention clearly states it is for Qt 5, not Qt 6 so that might be the reason for build failure. Qt 5 was using
qmake
to build modules, but Qt 6 usescmake
. It is a big change.@sierdzio
I compiled the module for Qt 6.5.3 before and I'm still using it on same PC. The module works nice on 6.5.3.
I think, there are huge differences between qt6.5 and 6.6.Also, I tried it on another PC where Qt was installed in /home. Same error occurs.
-
@sierdzio
I compiled the module for Qt 6.5.3 before and I'm still using it on same PC. The module works nice on 6.5.3.
I think, there are huge differences between qt6.5 and 6.6.Also, I tried it on another PC where Qt was installed in /home. Same error occurs.
-
Hi,
There's a thread on the development mailing list about bringing Qt Gamepad to Qt 6. You might want to check it.
-
@osos11 Could be a Qt bug, or some code was removed in Qt 6.6 (it does clean up some old leftovers from Qt 5). Perhaps best if you contact the people behind QtGamepad.
-
@sierdzio It's not a bug, the qmake build procedures were removed. All Qt modules need to either be ported to CMake, or use the public qmake API.
Thanks for everyone who write answer.
@SGaist I checked the link. I found a repo in the link. I cloned the github repository mentioned in the link and installed it on Qt6.6.1. It works fine.
The repo : https://github.com/pumphaus/qtgamepadlegacy
-
-
@imperador hi and welcome to devnet,
- Clone the project
- Create a build folder
- Use the qt-cmake wrapper of the version of Qt you want to configure and build the project
- Install the module
- Hack away with your new module
-
@SGaist Thanks! I was having problems with some modules not becoming QML elements, but now I solved it with your tips.
If anyone end up having the same problem, move the QGamepad, QGamepadManager and QGamepadKeyNavigation to the imports folders and adjust their headers accordingly. The QML elements will be generated when you run cmake and you can install them normally. Everything is fully working on Qt6.6 with android