Description
When compiling the 5.6.0 release candidate in c++98 mode, the build fails.
Configured with:
./configure -commercial -confirm-license -c++std c++98 -skip qtquickcontrols2 -skip qt3d -skip qtwayland -skip qtserialbus -qt-xcb
Compiler output:
gmake[4]: Entering directory `/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtlocation/src/imports/location' g++ -c -pipe -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_LOCATION_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_POSITIONING_LIB -DQT_CORE_LIB -I. -I../../location -I../../location/maps -I../../positioning -I../positioning -I. -Ideclarativeplaces -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtdeclarative/include/QtQuick/5.6.0 -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtdeclarative/include/QtQuick/5.6.0/QtQuick -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/include/QtGui/5.6.0 -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/include/QtGui/5.6.0/QtGui -I../../../include/QtLocation/5.6.0 -I../../../include/QtLocation/5.6.0/QtLocation -I../../../include -I../../../include/QtLocation -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtdeclarative/include -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtdeclarative/include/QtQuick -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/include -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/include/QtGui -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtdeclarative/include/QtQml/5.6.0 -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtdeclarative/include/QtQml/5.6.0/QtQml -I../../../include/QtPositioning/5.6.0 -I../../../include/QtPositioning/5.6.0/QtPositioning -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/include/QtCore/5.6.0 -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/include/QtCore/5.6.0/QtCore -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtdeclarative/include/QtQml -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/include/QtNetwork -I../../../include/QtPositioning -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/include/QtCore -I.moc -isystem /usr/include/libdrm -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/mkspecs/linux-g++ -o .obj/qquickgeomapgesturearea.o qquickgeomapgesturearea.cpp qquickgeomapgesturearea.cpp: In member function âvoid QQuickGeoMapGestureArea::setAcceptedGestures(QQuickGeoMapGestureArea::AcceptedGestures)â: qquickgeomapgesturearea.cpp:396:38: error: âGeoMapGestureâ is not a class or namespace setPanEnabled(acceptedGestures & GeoMapGesture::PanGesture); ^ qquickgeomapgesturearea.cpp:397:40: error: âGeoMapGestureâ is not a class or namespace setFlickEnabled(acceptedGestures & GeoMapGesture::FlickGesture); ^ qquickgeomapgesturearea.cpp:398:40: error: âGeoMapGestureâ is not a class or namespace setPinchEnabled(acceptedGestures & GeoMapGesture::PinchGesture); ^ qquickgeomapgesturearea.cpp: In member function âvoid QQuickGeoMapGestureArea::setEnabled(bool)â: qquickgeomapgesturearea.cpp:437:44: error: âGeoMapGestureâ is not a class or namespace setPanEnabled(m_acceptedGestures & GeoMapGesture::PanGesture); ^ qquickgeomapgesturearea.cpp:438:46: error: âGeoMapGestureâ is not a class or namespace setFlickEnabled(m_acceptedGestures & GeoMapGesture::FlickGesture); ^ qquickgeomapgesturearea.cpp:439:46: error: âGeoMapGestureâ is not a class or namespace setPinchEnabled(m_acceptedGestures & GeoMapGesture::PinchGesture); ^ gmake[4]: *** [.obj/qquickgeomapgesturearea.o] Error 1 gmake[4]: Target `first' not remade because of errors. gmake[4]: Leaving directory `/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtlocation/src/imports/location' gmake[3]: *** [sub-location-make_first] Error 2 gmake[3]: Target `first' not remade because of errors. gmake[3]: Leaving directory `/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtlocation/src/imports' gmake[2]: *** [sub-imports-make_first] Error 2
Apparently, GeoMapGesture enum values are referenced using the enum name, which is allowed in C+11 but not in C+98.
Fix is attached.
Attachments
For Gerrit Dashboard: QTBUG-51541 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
150850,2 | Fixes a compile error on linux/gcc-4.8 when using C++98 | 5.6 | qt/qt5 | Status: ABANDONED | -2 | 0 |
150892,2 | Fixes a compile error on linux/gcc-4.8 when using C++98 | 5.6 | qt/qtlocation | Status: MERGED | +2 | 0 |
151177,2 | Fixes a compile error on linux/gcc-4.8 when using C++98 | 5.6.0 | qt/qtlocation | Status: MERGED | +2 | 0 |