You are on page 1of 10
5119725, 1045 AM How to compile Qgis with debugging capabilly under Windows / Sudo Null IT News SUDONULL Home Random Post April 5, 2016 at 16:43 How to compile Qgis with debugging capability under Windows At work, | had to Face the Fact that | needed to Find out what actions are happening in the QGIS core. QGIS (Quantum GIS) - a free cross-platform geographic information system. The system itself is developed using the Qt toolkit. Through it, | decided to put together a Project, To do this, | downloaded the agis source from the official site and started building. The site itself has @ build guide using Qt Creator. Many articles have been read about the assembly and debugging of QGIS (some even sensible). But neither in the manual, nor on any resources did | find a solution to the problems that | encountered. So the idea was born to write my own build guide for QuantumGIS for Windows systems using Qt Creator, ‘ntps:fsudonul com/post89413-How-Lo-compile-Qs-wih-debugging-capabily-under Windows ano 5119725, 1045 AM How to compile Qgis with debugging capabilly under Windows / Sudo Null IT News Before collecting Initially, we download and install Qt Creator, Download from the official site . | used the compiled Qt libraries, (Attention! Qais does not officially support Qt . Better use Qt 4): we take from here . We put the Microsoft Windows SDK for Windows 7 and .NET Framework 4 ((SQ) (needed for setupapi). In addition, For debugging in Qt Creator you need a CDB (from the MS Debugging Tools package). ishere . We also download and install: Cmake , Flex and Bison . From the official site, download OSGeo4W for its version: here . We start it and select: advanced installation -> install from the Internet and click on. Select the following libraries: expat, Fcgi, gdal, gdal-dey, iconv, PyQt4, Qt4-Devel, qwt-devel- Qt4, sip, curl, gsl, hdF5, proj, qScintilla2, Sqlite3, libspatialindex-devel, geos, zlib. We are waiting For it to be installed. Download the Qgis source. Assembly Preparation ‘ntps:fsudonul com/post89413-How-Lo-compile-Qs-wih-debugging-capabily-under Windows 5119723, 10:45 AM How to compile Qgis with debugging capabilly under Windows / Sudo Null IT News | assume that everything worked out For you. We installed everything that is required and downloaded the source code. Launch Qt Creator. Then do: File > Open File or project. Use this dialog to open the CMakeLists.txt file. It is in the source, | have a path like this: D: \ gis2.8.7 \ CMakeLists.txt. Next, you will be prompted to create an assembly location. | create a specific directory: D: / Quantum-Gis. Next, you will be prompted to run Cmake build options. We will run it with the Following parameters: -DCMAKE_BUILD_TYPE = Debug, Sanycrnre CMake froanene bin =p 8 D'Quantin Geese nobwrypaue! nyo aa ut Det “CE A.EE NSIC eparerps: DORA BAD TV=Deug ‘eveparoo: [Fenparop ana Wale Oektp 10), After starting Cmake, we will indicate the path to the Folder where the QGIS sources are located and the path to the folder into which the configuration will be written. ‘ntps:fsudonul com/post89413-How-Lo-compile-Qs-wih-debugging-capabily-under Windows 519723, 10:45AM Where to bul the binares: 0: /Quartun-is Search: How to compile Qgis with debugging capabilly under Windows / Sudo Null IT News file Tools Options Heip Gripe El adanend [imaczwy] Ni SRDS CORAL STALE BISON _EXECUTABIE BUILD-TESTING MAKE BULD TYPE MAKE INSTALL PREFIX ENAELE COVERAGE ENABLE MODELTEST ENAELE GD ENABLE TESTS EXPAT_INICLUDE_OIR EXDATLLERARY FLEX EXECUTABLE GDALINCLUDE_DR GDAL LIBRARY GENERATE COVERAGE DOCS GEOS INCLUDE OR GEOS LIBRARY GIT_MARKER GRASS, PREFIX siceLas UB GSL_ING.UDE DR Value G/eyawin6s/bin/hison.exe a Debug, G/Program Files/qgs2.8.7 rs a et ie G/OSGeoMWNGH/include G/OSGeoWN64/ib/expatlib Geyqwin6s /bin/fles.exe C/OSGeod N64 include G/OSGeo4W64/lib/adal ii i G/OSGeolW64/include C/OSGeo4W64/Iib/geos_clib GTT_MARKER-NOTFOUND Press Configure to undate and dsplay new valuesin red, then press Generate to generate selected build fles. Current Generator: Nake Makefles After that, click “Configure” and select the “NMake Makefiles" compiler and leave the mark “Use default native compilers". Cmake will check the configuration and availabil Necessary components (marked in red). | will show my configuration. ‘ntps:fsudonul com/post89413-How-Lo-compile-Qs-wih-debugging-capabily-under Windows ty of the ano 5119725, 1045 AM How to compile Qgis with debugging capabilly under Windows / Sudo Null IT News BISON_EXECUTABLE C: /eygwin64/bin/bison.exe CMAKE_INSTAL_PREFIX C: / Program Files / qgis2.8.7 EXPAT_INCLUDE_DIR C: / OSGeo4w64 / include EXPAT_LIBRARY C: /OSGeo4W64/lib/expat.lib FLEX_EXBIBLEBLEXEXECECIB C GDAL_INCLUDE_DIR: / OSGeo4We4 / include GDAL_LIBRARY C: /OSGeo4w64/lib/gdal_ivtib GEOS_INCLUDE_DIR C: / OSGeo4W64 / include GEOS_LIBRARY C: /OSGec4Wé4/lib/geos_c.lib POSTGRESQL_INCLUDE_DIR C: / OSGeo4Weé4 / include POSTGRESQL_LIBRARY C: / OSGeo4W64 / lib /libpaulib PROJ_INCLUDE_DIR C: / OSGeo4W64 /include PROJ_LIBRARY C: /OSGeo4w64/lib/proj.lib PYRCC4_PROGRAM C: /OSGeo4WE4/bin/pyrcc4.exe PYTHON_INCLUDE_PATH C: / Python27 / include PYTHON_Pythib_pypy.lypy_pypy.lypy_pypy.lypy_pypy.libypy PYUIC4_PROGRAM C: /OSGeo4W64/apps/Python27/Lib/site-packages/PyQt4/uic/pyuic.py QSCINTILLA_INCLUDE_DIR C: /OSGeo4W64 / include / qt4 QSCINTILLA_LIBRARY C: QDIB4\, OS4IBI \ lib64_gib_log2 \ OS2 \ lib2 \ lib2 QTQMAKE_EXECUTABLE G /Qt/at-4.8.6x64-msvc2010/qt-4.8.6-x64- msve2010/pin/amake.exe QWT_INCLUDE_DIR C: / OSGeo4W64 / include / qwt QWT_LIBRARY C: / OSGe4. lib SETUPAPI_LIBRARY C: / Program Files (x86) / Windows Kits / 8.1 / Lib / winv6.3 / um / x64 / SetupAPhLib SPATIALINDEX_INCLUDE_DIR C: / OSGeo4W64 / include / spatialindex; C: / OSGeo4we64 / include SPATIALINDEX_LIBRARY C: /OSGeo4W64/lib/spatialindex-64.lib; C: /OSGeo4w64/lib/spatial 64.lib SPATIALLITE_INCLUDE_DIR C: /OSGeo4W64/libspatialite-4,3.0a/src/headers SPATIALLITE_LIBRARY C: /OSGeo4w64/lib/spatialite lib SQLITE3_INCLUDE_DIR C: / OSGeo4W64 / include SQLITE3_LIBRARY C: /OSGeo4we64/salite3.lib ‘TXT2TAGS_EXECUTABLE TXT2TAGS_EXECUTABLE-NOTFOUND ‘ntps:fsudonul com/post89413-How-Lo-compile-Qs-wih-debugging-capabily-under Windows s10 5119725, 1045 AM How to compile Qgis with debugging capabilly under Windows / Sudo Null IT News Name ‘alve a The configuration should go without errors. (Attention! | recommend setting environment variables on folders, otherwise you will have to manually set all the paths). After a successful configuration, click "Generate" and generate the configuration files, Next, close Cmake and return to Qt Creator. Click the “Finish” button. Project assembly Now for the project itself, We go to the tab "Project". At the top is the "Management" button, In the window that opens, on the tab "Build and Run" => "Basic", specify the project directory, For example, D: \ Quantum-GlS. On the Text Editor tab -> File Encoding Behavior - > The default value is windows-1251 / CP1251. Next, go back to the tab "Build and run" -> "Compilers" and make sure that among the detected there are at least some of the compilers from the Following. ‘ntps:fsudonul com/post89413-How-Lo-compile-Qs-wih-debugging-capabily-under Windows 519923, 1045 AM How to compile Qgis with debugging capabily under Windows Sudo Null IT News Next, select the “Qt Versions" tab, click the “Add” button and specify the path to the Previously installed Qt C library: Qt \ 4.8.6 \ bin \ amake.exe. In the profile name, for example, we write Qt 4.8.6 MSVC2010 64bit. ‘ntps:fsudonul com/post89413-How-Lo-compile-Qs-wih-debugging-capabily-under Windows m0 si1923, 1048 M4 Howto compl sis win debug capabiy under Windows Suto NIT News Now you can make a bunch of tools, Go to the "Components", click the "Add" button and in the properties of the new bundle specify the components. | have them like this: (you can have your own compiler and debugger) Close the “Parameters” by First pressing the “Apply” button, The project is ready for assembly. To collect it you need to click on the hammer icon below. Compilation should be error-free. IF there are no errors, you need to dump it into the created folder where the QGIS files, linked libraries were compiled: expat.all, Freexldll, gdal200.dll, geos.c.all, hdfS.dll, iconv.dll, jpeg.dll, jpeg12.dll, libcurldll, libpq.dll, libtiffall, libxmi2.dll, ogi, all, projdll, qscintilla2.dll, QtCore4.dll, QtGui4.dll, QtNetwork4dll, QtSql4.dll, QtSved.dll, quts.dll, QtXmid4.dll, spatialindex-64.all, spatialite.dll, sqlite3. all, szip.all, xerces-c_3_1.dlllzlib.dll. All libraries are located in the folder C: \ OSGeo4w64 \ bin, | connected Qt libraries from compiled libraries, Next, copy the folder C: \ OSGeo4W64 \ etc to the folder with the compiled QGIS files, in my case: D: \ Quantum-GIS \ output. We also copy two batch Files agis.bat and o4w_env.bat From C: \ OSGeo4wéé \ bin to the directory D: \ Quantum-GIS \ ‘output \ bin. Back to the Qgis startup settings in Qt cCreator. On the tab "Project" open the tab "Launch". Specify the directories where the QGIS exe File and the working directory are located, ‘ntps:fsudonul com/post89413-How-Lo-compile-Qs-wih-debugging-capabily-under Windows 5119725, 1045 AM How to compile Qgis with debugging capabilly under Windows / Sudo Null IT News ‘ayo Koneeypana sana: [age 7) (aefomes =] | Yasnrs | (epemoms] Tarpon Deum Sepstnopsae (ee Iorerminonbratersoat Feoushearne: Piura 6 (ots. IF QGIS has started, now you can debug it by pressing a button with a ladybus, Enjoy it, Possible mistakes 1. Python library. The official qgis build guide recommends choosing the python27 library installed in osge4w. | did not manage to collect with her. | downloaded a separate python27 library From the official Python site. Earned. 2. After installing Qt, create the QTDIR environment variable. If this is not done, there will be problems with the Qt libraries, the project will not be able to Find them. (The same thing needs to be done with Qt_MOC, QT_RCC, QT_UIC but it worked without me). 3. Problems with libraries. IF you build the application in release mode and the library in debug mode, errors will occur. Make sure that both the project and the library are the same version. (I had this with the qut library. The compiler produced QWidget: Must construct a QApplication before a QPaintDevice. Replaced the library version - it worked). Hope my article will be helpful. Compiled Qais version 2.8.7 on Windows 7 x64-bit system. Tags: agis qtcreator project assembly Also popular now: Iphone Navigation Sociological meat ‘The terms of the deal with Yahoo! How Eset Loses Customers ‘ntps:fsudonul com/post89413-How-Lo-compile-Qs-wih-debugging-capabily-under Windows 90 si1973, 1045. aM How to compile Gals with debugaing capabity under Windows! Sudo Null IT News Using. deb packages to distribute cade User motivation for creating.content Report on Web Standards Days in Minsk Learn more about publishing features, Your footprints on your hard drive, Part 1+ Getting the image Remember complex passwords ‘ntps:fsudonulcom/post89413-How-Lo-compile-s-wih-debugging-capabily-under Windows 1010

You might also like