Re: [Qgis-user] Error compiling QGIS 2.18.8: "QStringLiteral was not declared in this scope"
Thanks Jürgen and Larry for your fast responses! Now I sit here trying to get this to work in my machine. Downloaded the latest master from GitHub and see that now it can only accept qt5 and py3. QGIS is moving fast! Cheers and thanks again! /Hernán On Thu, May 25, 2017 at 8:34 AM, Jürgen E. Fischer wrote: > Hi Larry, > > On Wed, 24. May 2017 at 15:33:00 -0600, Larry Shaffer wrote: > > Side note: I have gotten around it for C++ plugin development, where I > > wanted to compile the same plugin code for QGIS 2 and 3 while focusing > more > > on QGIS 3 coding style/standards, by using the following macro: > > That is also in recent versions of qca. So this bug only unfolded on > platforms > that had older versions (jessie/trusty) - which initially was a bit > puzzling. > > > Jürgen > > -- > Jürgen E. Fischer norBIT GmbH Tel. > +49-4931-918175-31 > Dipl.-Inf. (FH) Rheinstraße 13 Fax. > +49-4931-918175-50 > Software Engineer D-26506 Norden > http://www.norbit.de > QGIS release manager (PSC) GermanyIRC: jef on FreeNode > > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user > ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Error compiling QGIS 2.18.8: "QStringLiteral was not declared in this scope"
Hi Larry, On Wed, 24. May 2017 at 15:33:00 -0600, Larry Shaffer wrote: > Side note: I have gotten around it for C++ plugin development, where I > wanted to compile the same plugin code for QGIS 2 and 3 while focusing more > on QGIS 3 coding style/standards, by using the following macro: That is also in recent versions of qca. So this bug only unfolded on platforms that had older versions (jessie/trusty) - which initially was a bit puzzling. Jürgen -- Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31 Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50 Software Engineer D-26506 Norden http://www.norbit.de QGIS release manager (PSC) GermanyIRC: jef on FreeNode signature.asc Description: PGP signature ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Error compiling QGIS 2.18.8: "QStringLiteral was not declared in this scope"
Hi Hernán, It looks like someone backported a fix from QGIS 2.99 (upcoming 3.0 release) code branch, where QStringLiteral() is preferred over QString() because it is available in Qt5, and other reasons. The use of QStringLiteral in 2.x code bases needs removed (as Jürgen mentioned). Side note: I have gotten around it for C++ plugin development, where I wanted to compile the same plugin code for QGIS 2 and 3 while focusing more on QGIS 3 coding style/standards, by using the following macro: #ifndef QStringLiteral // Add define for Qt4 // Source code is assumed to be encoded in UTF-8 (as per Qt5 macro) //# define QStringLiteral(str) QString::fromUtf8(str, sizeof(str) - 1) // But... that macro does not appear to work on Linux with GCC, // Just add QString() stub instead # define QStringLiteral(str) QString(str) #endif This *could* be added to 2.x branches (to guard against this type of error), but there is the problem that there is no standard base included header file, e.g. qgis.h and qgsconfig.h are not always included. So, no clear place to put the macro. Regards, Larry Shaffer Dakota Cartography Black Hills, South Dakota -- Boundless Desktop and QGIS Support/Development Boundless Spatial - http://boundlessgeo.com lshaf...@boundlessgeo.com Larry Shaffer Dakota Cartography Black Hills, South Dakota -- Boundless Desktop and QGIS Support/Development Boundless Spatial - http://boundlessgeo.com lshaf...@boundlessgeo.com On Wed, May 24, 2017 at 3:21 PM, Jürgen E. Fischer wrote: > Hi Hernán, > > On Wed, 24. May 2017 at 22:56:49 +0200, Hernán De Angelis wrote: > > I am trying to compile 2.18.8 from source. This is my usual way of > > installing QGIS and I never experience any dramatic problems. However, > this > > time I keep getting the following cryptic error, which I cannot seem to > get > > around: > > Apply af8fb04f. > > > Jürgen > > > -- > Jürgen E. Fischer norBIT GmbH Tel. > +49-4931-918175-31 > Dipl.-Inf. (FH) Rheinstraße 13 Fax. > +49-4931-918175-50 > Software Engineer D-26506 Norden > http://www.norbit.de > QGIS release manager (PSC) GermanyIRC: jef on FreeNode > > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user > ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Error compiling QGIS 2.18.8: "QStringLiteral was not declared in this scope"
Hi Hernán, On Wed, 24. May 2017 at 22:56:49 +0200, Hernán De Angelis wrote: > I am trying to compile 2.18.8 from source. This is my usual way of > installing QGIS and I never experience any dramatic problems. However, this > time I keep getting the following cryptic error, which I cannot seem to get > around: Apply af8fb04f. Jürgen -- Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31 Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50 Software Engineer D-26506 Norden http://www.norbit.de QGIS release manager (PSC) GermanyIRC: jef on FreeNode signature.asc Description: PGP signature ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Error compiling QGIS 2.18.8: "QStringLiteral was not declared in this scope"
Hi, I am trying to compile 2.18.8 from source. This is my usual way of installing QGIS and I never experience any dramatic problems. However, this time I keep getting the following cryptic error, which I cannot seem to get around: Building CXX object src/app/CMakeFiles/qgis_app.dir/qgisapp.cpp.o /usr/local/src/qgis-2.18.8/src/app/qgisapp.cpp: In member function ‘QgsVectorLayer* QgisApp::addVectorLayer(const QString&, const QString&, const QString&)’: /usr/local/src/qgis-2.18.8/src/app/qgisapp.cpp:9318:52: error: ‘QStringLiteral’ was not declared in this scope layer->setName( QStringLiteral( "%1 %2 %3" ).arg( layer->name(), elements.at( 1 ), elements.at( 3 ) ) ); ^ src/app/CMakeFiles/qgis_app.dir/build.make:847: recipe for target 'src/app/CMakeFiles/qgis_app.dir/qgisapp.cpp.o' failed make[2]: *** [src/app/CMakeFiles/qgis_app.dir/qgisapp.cpp.o] Error 1 CMakeFiles/Makefile2:1823: recipe for target 'src/app/CMakeFiles/qgis_app.dir/all' failed make[1]: *** [src/app/CMakeFiles/qgis_app.dir/all] Error 2 Makefile:149: recipe for target 'all' failed make: *** [all] Error 2 Any hint of what's going wrong? System: openSUSE Leap 42.2, python 2.7.12, Qt 4.8.6, gdal 2.1.3, geos 3.6.0 Thanks in advance /H. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user