Thanks.
  I tried to follow your suggestion, updated nmake.opt, added the PROJ library 
and here is what I get:


D:\Terrain\Extern\gdal-3.1.3>nmake -f makefile.vc MSVC_VER=1927 WIN64=1

Microsoft (R) Program Maintenance Utility Version 14.27.29110.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        cd port
        nmake /nologo /f makefile.vc
        call prev_dllbuild.bat
The system cannot find the path specified.

D:\Terrain\Extern\gdal-3.1.3\port>IF NOT EXIST dllbuild.prev (ECHO 1 ) 
1>dllbuild.prev

D:\Terrain\Extern\gdal-3.1.3\port>SET /P PREV_DLLBUILD= 0<dllbuild.prev

D:\Terrain\Extern\gdal-3.1.3\port>IF NOT "1" == "1" (ECHO 1 ) 1>dllbuild.prev
NMAKE : fatal error U1077: 'call' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64\nmake.EXE"' : 
return code '0x2'
Stop.

Alexis Vaisse
Wysilab

-----Message d'origine-----
De : gdal-dev [mailto:[email protected]] De la part de Mateusz 
Loskot
Envoyé : mardi 8 septembre 2020 11:38
À : [email protected]
Objet : Re: [gdal-dev] Compiling GDAL with Visual Studio 2019

On Tue, 8 Sep 2020 at 11:26, Alexis Vaisse <[email protected]> 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
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to