[Qgis-developer] Building and debugging QGIS on Windows x64
Casper Børgesen (CABO)
CABO at NIRAS.DK
Tue Oct 18 23:21:40 PDT 2016
Hi Frits
Thank you for your answer and your guidance. I used Jürgens advise and used the spatialite_i.lib instead and I got a bit further. I am now also able to run and debug a QGIS session, but I cannot use python either, which I really want to.
I am using master_2 and building QGIS using "RelWithDebInfo", since "debug" gives me a lot of errors. Are the difference between the two, that using "debug" I'll be able to debug dependencies and not just the QGIS project?
Right now when I build the solution I get a set of errors which all seems to have the same pattern (this one for the pyplugin-installer):
263>------ Build started: Project: pyplugin-installer, Configuration: RelWithDebInfo x64 ------
262> qgis_geometrytest.vcxproj -> C:\QGIS\build\output\bin\RelWithDebInfo\qgis_geometrytest.exe
262> qgis_geometrytest.vcxproj -> C:\QGIS\build\output\bin\RelWithDebInfo\qgis_geometrytest.exe
263> Building Custom Rule C:/QGIS/master_2/python/pyplugin_installer/CMakeLists.txt
263> CMake does not need to re-run because C:\QGIS\build\python\pyplugin_installer\CMakeFiles\generate.stamp is up-to-date.
263> Generating ui_qgsplugininstallerfetchingbase.py
98>c:\qgis\master_2\src\app\ogr\qgsvectorlayersaveasdialog.cpp(294): warning C4701: potentially uninitialized local variable 'factory' used
263> Traceback (most recent call last):
263> File "C:\QGIS\master_2\scripts\\pyuic-wrapper.py", line 26, in <module>
263> import qgis.PyQt.uic.pyuic
263> File "C:\QGIS\build\output\python\qgis\__init__.py", line 27, in <module>
263> from qgis.core import QgsFeature, QgsGeometry
263> File "C:\QGIS\build\output\python\qgis\core\__init__.py", line 30, in <module>
263> from qgis._core import *
263> ImportError: DLL load failed: The specified module could not be found.
263>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code 1.
Has this got something to do with the double slash near pyuic-wrapper.py and in that case, where should I fix it? Or is this problem about something completely different?
Regards, Casper
-----Original Message-----
From: Qgis-developer [mailto:qgis-developer-bounces at lists.osgeo.org] On Behalf Of fritsvanveen
Sent: 18. oktober 2016 09:05
To: qgis-developer at lists.osgeo.org
Subject: Re: [Qgis-developer] Building and debugging QGIS on Windows x64
Hi Casper
I have recently build QGIS on my Windows10 system with Visual Studio 2010 with partial success. I could run and debug QGIS, but Python support did not work (yet).
This is my shortlist of fixes to get my build working:
add libs to qgis_core:
setupapi.lib
C:\OSGeo4W64\lib\lwgeom.lib
C:\OSGeo4W64\lib\libxml2.lib
C:\OSGeo4W64\lib\freexl_i.lib
C:\OSGeo4W64\lib\iconv.lib
C:\OSGeo4W64\lib\zlib.lib
legacy_stdio_definitions.lib
add libs to virtuallayerprovider:
C:\OSGeo4W64\lib\lwgeom.lib
C:\OSGeo4W64\lib\libxml2.lib
C:\OSGeo4W64\lib\freexl_i.lib
C:\OSGeo4W64\lib\iconv.lib
C:\OSGeo4W64\lib\zlib.lib
qgis_core
Ignore specific default libraries: LIBCMT.lib
remainder not found: define in gmath.c
double remainder(double X, double Y) { return fmod(X, Y); }
compile with /bigobj:
python_module_qgis__gui.vcxproj
python_module_qgis__core.vcxproj
spatialite.lib does not include the 5 libs from OSGeo4W64, so I added them.
The DLL which gets included with spatialite_i.lib has those libs onboard, so Jürgen's advice is probably better.
The other changes will manifest themselves as the compiler and linker start to complain!
Each time, you update the source from the remote master, the changes have to be performed again!
BTW, are you building master_2? The master depends now on Qt5 and Python3 and the build instructions are not targeted for that. I am now in the process of building the master with Visual Studio 2015, where I have to build some libraries myself from source.
Let me know if I can help.
Frits
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Building-and-debugging-QGIS-on-Windows-x64-tp5291058p5291188.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
_______________________________________________
Qgis-developer mailing list
Qgis-developer at lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
More information about the Qgis-developer
mailing list