[gdal-dev] Compiling GDAL with Visual Studio 2019

Mateusz Loskot mateusz at loskot.net
Tue Sep 8 02:38:14 PDT 2020


On Tue, 8 Sep 2020 at 11:26, Alexis Vaisse <alexis.vaisse at wysilab.com> wrote:
>   I’m trying to compile GDAL with Visual Studio 2019.
>   The batch file to generate the project runs with no error. But when I try to compile the project, I get so many different errors I guess I did something wrong, but I don’t know what.
>
>   Did somebody already succeed in compiling GDAL for Visual Studio 2019?

Yes, many times.

First, you don't have to generate .vcxproj files with the .bat script
to build GDAL.
Just run `nmake.exe` command in the VS Command Prompt.

However, before you attempt to build GDAL, you need to:
- Read https://trac.osgeo.org/gdal/wiki/BuildingOnWindows
- Check also https://trac.osgeo.org/gdal/wiki/BuildHints for specific
needs/dependencies/drivers
- Collect dependencies you require
- Edit nmake.opt to disable/enable features/drivers you don't
need/need, you have third-party dependencies for, etc.
- Run NMAKE

GDAL is not a self-contained project.
GDAL has numerous dependencies that you need to provide/install,
On Windows, manual editing of nmake.opt to configure your build is necessary.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net


More information about the gdal-dev mailing list