Sergio6Rey
Sergio6Rey

Reputation: 401

How to use <gdal/gdal.h> in Windows with MinGW?

I am developing a program using Qt and I have to use the header . However, I am not sure how to install GDAL on Windows. I have Windows 10 and MinGW 7.3.0.

I have followed the instructions in https://trac.osgeo.org/gdal/wiki/BuildingWithMinGW. But after typing ./configure, the make command throws an error of the type "./config.status: no such file or directory".

I only want to install the GDAL library in Windows in order to compile my Qt program, I do not need to follow the previous instructions.

I am a newbee at this topics, so all help will be welcome.

Upvotes: 0

Views: 1270

Answers (2)

Sergio6Rey
Sergio6Rey

Reputation: 401

Finally and after some effort I found the way to correctly install the GDAL library and its dependencies for using it in C/C++ code in Windows 10. Here you can download the 32 or the 64 version of a installer of geospatial software. In the installer, you should choose only the GDAL packages (not the QGIS or Grass ones). At the end, the header and dll files should be installed in the directory "C:\OSGeo4W".

You can now develop software in Windows using the GDAL library. If you have any further question, I will gladly answer.

Upvotes: 3

Brecht Sanders
Brecht Sanders

Reputation: 7305

GDAL is quite a complex package to build. The main reason is that you need to have all the dependancies in place, (including: libdl sqlite3 libcurl libjpeg libpng libtiff postgresql zlib geos proj libdl json xerces libxml2 pcre) and that it expects to find these under /usr/local.

If building from source is new to you, I would recommend you search for already built binaries.

Upvotes: 1

Related Questions