[gdal-dev] Compile gdal/ogr with mingw

David Tran david.tran at hsr.ch
Thu Mar 27 06:59:37 PDT 2014


Hi Even

Thanks for your input.

i586-mingw32msvc in Ubuntu 13.10 compiles gdal without errors. Some test 
code:

> #include <iostream>
> #include "ogrsf_frmts.h"
>
> int main() {
> 	std::cerr << "Hello World!" << std::endl;
> 	OGRRegisterAll();
> }

Result:
"Hello World!" does not show in the console with the function 
OGRRegisterAll().

Do you know why it doesn't work? Any other ideas?

Cheers
David

-------- Original Message  --------
Subject: Re: [gdal-dev] Compile gdal/ogr with mingw
From: Even Rouault <even.rouault at mines-paris.org>
To: David Tran <david.tran at hsr.ch>
Date: Thursday, 27. March 2014 14:08:28

> I haven't tried recently with mingw binaries in Windows, but the build with the
> i586-mingw32msvc cross compiler from Linux works and the resulting executable
> can pass the regression tests.
>
>>
>> Hi to everyone
>>
>> Did somebody compile gdal/ogr with mingw?
>>
>> I tried to compile gdal (static/shared) with MinGW without success of
>> calling the function OGRRegisterAll() in QT 5.2.1 (C++). Starting the
>> binary results in:
>>
>>   > The program has unexpectedly finished.
>>
>> I used those tutorials:
>>
>>
> http://gvsigce.sourceforge.net/wiki/index.php/Compiling_the_C/C%2B%2B_support_libraries
>>
>> http://trac.osgeo.org/gdal/wiki/BuildingWithMinGW
>>
>> http://www.gdal.org/ogr/ogr_apitut.html
>>
>> and this shell script with updated version numbers:
>>
>>
> http://sourceforge.net/p/gvsigce/code/HEAD/tree/trunk/support/build_scripts/build_gdal_binaries_mingw.sh
>>
>> My System:
>>
>> Windows 8.1,
>> Expat 2.1.0
>> GDAL 1.10.1
>> Geos 3.4.2
>> Openssl 1.0.1f
>> PostgreSQL 9.3.4
>> Proj.4 4.8.0 (Datumgrid 1.6RC1)
>> Sqlite 3080401
>> zlib 1.2.8
>>
>> Two versions of MinGW 32bit were used at the same time for gdal to compile:
>>
>> http://sourceforge.net/projects/mingw/files/
>>
>> and
>>
>>
> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.8-release/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z/download
>>
>> PATH: C:\MinGW\bin;C:\mingw32\bin
>>
>> cheers
>> David
>>
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>


More information about the gdal-dev mailing list