0

I'm working on a project where we would like to add QGIS features to an existing Qt application.

The Qt application has been built with Qt5.2.1 using MinGW 4.8 and thus I think I need to build QGIS with MinGW 4.8. If I'm wrong on this I'd be glad to hear what can be done.

If I'm right, my problem is that the QGIS building-from-source tutorial (https://raw.github.com/qgis/QGIS/master/INSTALL) is indeed outdated as far as MinGW is concerned and the given msys environnement is not working with the current QGIS cmake files. I tried to edit those but some libraries are not in msys (spatialite and spatialindex) and it seems linking to Qt5 instead of Qt4 isn't working (problem with QT4_WRAP_CPP).

I thought I'd just try to build spatialite myself first but the procedure seems to take ages (http://www.gaia-gis.it/gaia-sins/mingw_how_to.html) and I'm not even sure it would work in the end.

If there's anything else I can do (a QGIS plugin for Qt for instance) I'd forget about building without an inch of regret so do not hesitate to share. The only thing to consider is that I'd rather keep Qt5.2.1 because it includes OpenGL and Android support which are both probably going to be needed for further developments.

In case nothing can be done for QGIS to work with my project, do you know any other GIS API that has comparable features ?

Thanks for your help !

0

Your question could have been more focused (try to write future questions such that they only have a single question).

QGIS 2.x is Qt4, not Qt5. See Can I use QGIS with Qt5?

Qt4 and Qt5 are not source compatible.

SpatiaLite is developed using Linux and msys. It is possible to build it, but you can just download pre-built software from http://www.gaia-gis.it/gaia-sins/windows-bin-x86/ (or the -amd64 directory if you are on a 64 bit machine).

You might be able to use QGIS externally, but it isn't really designed to be embedded. Perhaps if you provided more details on your application and exact requirements (in another question) we could provide more useful answers.

  • Sorry about that, I just wanted to be thorough in my explanation of the situation. That being said, I can only see one question mark :p Thanks your for the answer, do you know any GIS designed to be embedded ? I'll probably follow your advice and ask another question about that. – Aurélien Apr 18 '14 at 8:59
  • Depends on what you need. SpatiaLite (disclosure - I'm a developer) may do some of what you need. You may be able to drive QGIS. Its a very broad (too broad) area without a lot of specific detail. – BradHards Apr 18 '14 at 9:24
  • I am in the process in trying to build QGis dependencies with mingw for win7, so far it is going good except for spatialite, still struggling with that one. When that is done i am going to try building Qgis, with Qt5. There is a repo github.com/m-kuhn/QGIS with a branch "final-2_4_0-qt5" that i used to build Qgis with Qt5 on Ubuntu 12.04 When i am finished with the dependencies build for Qgis with mingw i can load the shell script i put together for this in my git hub account and you can grab it from there if you like. – Theuns Heydenrych Oct 30 '14 at 8:23
  • I have build some of the QGis dependencies with MinGW, among them spatialite and spatialindex, have a look at github.com/t-hey/QGisDeps-Mingw32 if you are interested. Hope it helps. – Theuns Heydenrych Oct 30 '14 at 14:08
  • Have you been able to build the geotiff libs in mingw? – jhowland Jan 14 '15 at 18:46

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.