1

We have two c++-plugins for QGIS and thought with the LTR release we are bit saver against the fast version-changes. Today I updated my QGis from 2.14.0 to 2.14.4 and had to recognise, that the plugins couldn't been loaded. Could be the reason therefore the new QGIS is built and deployed with a newer GDAL/OGR?

Or is there for every build of QGis requiered to have a seperate build for the plugin?

So I have to download and update the sources again and recreate the VS Project for every subversion of the LTR?

EDIT:

Found out, need new gdal_i.lib and spatialite_i.lib to compile, so I changed it in the Linker-Properties of my VS-Project. Then I need the libs qgis_core and qgis_gui. Downloaded them with the qgis-devel and linked it. But now I get the following Linker error:

Fehler 1058 error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual bool __thiscall QgsSymbolLayerV2::writeDxf(class QgsDxfExport &,double,class QString const &,class QgsSymbolV2RenderContext *,class QgsFeature const *,class QPointF)const " (?writeDxf@QgsSymbolLayerV2@@UBE_NAAVQgsDxfExport@@NABVQString@@PAVQgsSymbolV2RenderContext@@PBVQgsFeature@@VQPointF@@@Z)". QGISFunc.obj tb4qgisplugin

But in code I can't find any hint, never use sth like DXF. Any idea?

  • I suspect you will have to recompile against that version of QGIS? Is there a reason they are C++ and not just Python which are a bit more portable? – Nathan W Jul 20 '16 at 11:13
  • The decision to develop a plugin was made in 2011(Wroclaw). Now it is just so. Probably our company has not enough ressources in time to port it to python.... Nevertheless don't understand, why bring out a 'stable' version with 0..1..2..3..4 subversions. – Ms. Smith Jul 20 '16 at 11:41
  • 1
    Well that is the point of the stable version, point releases. I'm not sure you need to recompile that was a stab in the dark. – Nathan W Jul 20 '16 at 11:44
  • 1
    QGIS has moved from GDAL 1.11 to 2.1. This might break some plugins. – AndreJ Jul 20 '16 at 12:04
  • @AndreJ Yes, 2.14.0 is built with GDAL 2.0.2 and now it has 2.1. But how can I check this out? Is there somewhere a variable to use the old gdal, just to find the reason? – Ms. Smith Jul 20 '16 at 12:10
0

Following I found out:

For deploying a cpp-plugin for QGIS it is requiered building the dll separately for every version - even point releases of a LTR. From this perspective it makes no difference if it is the actual or the ltr release. We have to take care that customers are using same version/point realease.

For setting up development environement I don't need to download every time complete source to setting up my VisualStudio-Project and compile QGIS. This I do only for a new LTR. For a new point release I defined this workflow for me (maybe someone helpes this)

  1. with OSgeo4W-installer download the qgis-common and qgis-devel for ltr
  2. in properties of the VisualStudio-project of the plugin:

    in section C/C++ add include path "C:\OSGeo4W\apps\qgis-ltr\include"

    in section linker->input customize pathes to additional dependances i.e.C:\OSGeo4W\apps\qgis-ltr\lib\qgis_core.lib and C:\OSGeo4W\apps\qgis-ltr\lib\qgis_gui.lib

  3. compiling the plugin now mustn't not fail and loading from QGIS without errors...hope this for the next

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.