[Qgis-developer] QGis build with Mingw64

Tim Sutton lists at linfiniti.com
Sun Feb 24 05:02:58 PST 2013


Hi

On Sun, Feb 24, 2013 at 2:22 PM, Theuns Heydenrych
<theunsheydenrych at gmail.com> wrote:
> To be honest there's no particular reason, but I will let you in on how I/we
> decided on Mingw64
>
> We are developing a cross platform application with GIS as one of the
> application's modes.
> We decide to use QGis libraries to provide the GIS functionality.
> I played around with your(Tim Sutton) examples to use QGis widgets in a Qt
> application, and with that created a Qt plugin that i tested in a sample
> application to load the plugin, display the map canvas on a QFrame, to load
> a geotiff , and to use the various maptools.
>
> All this was done on a Ubuntu 12.04 64bit environment with Qt.
>
> We would like to the same for Win7 64bit.
> So I thought while i am going to use Qt 64bit on Win7 with Mingw64 i might
> as well try to everything in Mingw64.
>
> I hoped that the Qgis libs would already be available in 64bit for windows,
> after reading mailing list postings of Nov 2012
> http://osgeo-org.1560.n6.nabble.com/64bit-Windows-version-td5016852.html ,
> but it looks like it did not materialise. According to the mailing list
> thread it looks like there is interest for a 64bit version on Windows for
> QGis.
>
> So that's how i decided on Mingw64 and to be honest i have no experience in
> the MS development tools, will it be possible then to build Qgis 64bit
> version with msvc 2008 and use the libraries in Qt64 bit?
> I have no idea.
>

The porblem is that typically you need ALL dependent libs compiled as
64 bit which is a big chore if you are trying to focus on your app. My
suggestion would be to go with a 32 bit build since a) you will be
heading into uncharted waters running QGIS  and its dep stack on win
as 64 bit and b) osgeo4w provides all the dependencies for you as 32
bit binaries already so thats going to save you hours / days of work.

The INSTALL.txt [1] document provided with the source provides a
detailed step-by-step guide guide that to be honest does not require
much windows knowledge and will give you the compilation platform you
need to build your own  custom QGIS binaries.

By the way there are also a couple of articles on my blog (e.g. [2])
describing how to package up QGIS for Windows as a standalone
installer when you are done.

Hope that helps!

Regards

Tim

[1] https://github.com/qgis/Quantum-GIS/blob/master/INSTALL#L539
[2] http://linfiniti.com/2011/05/building-custom-qgis-installers-for-windows/

> Suggestions will be appreciated, thank you.
>
> Regards
> Theuns Heydenrych
>
>
>
> On Sun, Feb 24, 2013 at 11:29 AM, Tim Sutton <lists at linfiniti.com> wrote:
>>
>> Hi
>>
>> Any particular reason you are using mingw rather than msvc 2008 (which is
>> well supported)?
>>
>> Regards
>>
>> Tim
>>
>> On 24 Feb 2013 9:33 AM, "Theuns Heydenrych" <theunsheydenrych at gmail.com>
>> wrote:
>>>
>>> I am trying to build QGis with Mingw64 on windows.
>>> I have Qt64-4.8.4 on the machine and MSys and Mingw64.
>>>
>>> I have opened the CMakeLists.txt in QtCreator and set all the
>>> dependencies for Qgis in the opening wizard for QtCreator.
>>> When compiling i get the following error, can anybody give me some hints
>>> where to start looking, to get it compiled?
>>>
>>> Best Regards
>>> Theuns Heydenrych
>>>
>>> 09:11:03: Running steps for project qgis1.9.0...
>>> 09:11:03: Starting: "C:\mingw\bin\mingw32-make.exe"
>>> [  0%] Built target version
>>> [  0%] Building CXX object src/core/CMakeFiles/qgis_core.dir/qgis.cpp.obj
>>> src\core\CMakeFiles\qgis_core.dir\build.make:1234: recipe for target
>>> 'src/core/CMakeFiles/qgis_core.dir/qgis.cpp.obj' failed
>>> CMakeFiles\Makefile2:1118: recipe for target
>>> 'src/core/CMakeFiles/qgis_core.dir/all' failed
>>> makefile:145: recipe for target 'all' failed
>>> C:\dev\cpp\Quantum\src\core\qgis.cpp:48:27: error: external linkage
>>> required for symbol 'GEOPROJ4' because of 'dllexport' attribute
>>> C:\dev\cpp\Quantum\src\core\qgis.cpp:53:27: error: external linkage
>>> required for symbol 'GEOWKT' because of 'dllexport' attribute
>>> C:\dev\cpp\Quantum\src\core\qgis.cpp:66:27: error: external linkage
>>> required for symbol 'PROJECT_SCALES' because of 'dllexport' attribute
>>> C:\dev\cpp\Quantum\src\core\qgis.cpp:70:27: error: external linkage
>>> required for symbol 'GEO_EPSG_CRS_AUTHID' because of 'dllexport' attribute
>>> C:\dev\cpp\Quantum\src\core\qgis.cpp:72:27: error: external linkage
>>> required for symbol 'GEO_NONE' because of 'dllexport' attribute
>>> mingw32-make[2]: *** [src/core/CMakeFiles/qgis_core.dir/qgis.cpp.obj]
>>> Error 1
>>> mingw32-make[1]: *** [src/core/CMakeFiles/qgis_core.dir/all] Error 2
>>> mingw32-make: *** [all] Error 2
>>> 09:11:06: The process "C:\mingw\bin\mingw32-make.exe" exited with code 2.
>>> Error while building/deploying project qgis1.9.0 (kit: Desktop 64)
>>> When executing step 'Make'
>>>
>>> _______________________________________________
>>> Qgis-developer mailing list
>>> Qgis-developer at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>



--
Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Visit http://linfiniti.com to find out about:
 * QGIS programming and support services
 * Mapserver and PostGIS based hosting plans
 * FOSS Consulting Services
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
==============================================


More information about the Qgis-developer mailing list