From 4daabcbaa5139db14c3b3ded65e02d536d5ae7d2 Mon Sep 17 00:00:00 2001 From: Cody Martin Date: Tue, 5 May 2020 06:44:54 -0700 Subject: [PATCH] Add gdal+proj libraries to PATH in MSVC environment setup script More specifically: call gdal-dev-env.bat as part of msvc-env.bat. Without doing this, the a build of the qgis.sln file in MSVC fails. Specifically, the synccrsdb project fails with: #> Running crssync #>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code -1073741515. Running crssync.exe from the command line also fails: C:\OSGeo4W64>QGIS>ms-windows\osgeo4w\build-qgis-test-x86_64\output\bin\RelWithDebInfo\crssync.exe The code execution cannot proceed because gdal302.dll was not found. Reinstalling the program may fix this problem. The code execution cannot proceed because proj_7_1.dll was not found. Reinstalling the program may fix this problem. The code execution cannot proceed because gdal302.dll was not found. Reinstalling the program may fix this problem. With this change, the configonly.bat workflow produces a qgis.sln file that builds to completion. The package-nightly.cmd script already called this additional .bat file to set up the PATH to gdal and proj libraries: call msvc-env.bat %ARCH% call gdal-dev-env.bat So it makes sense to add this call into msvc-env.bat. --- ms-windows/osgeo4w/msvc-env.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/ms-windows/osgeo4w/msvc-env.bat b/ms-windows/osgeo4w/msvc-env.bat index 0dae07f8be4..ceab5e646b0 100644 --- a/ms-windows/osgeo4w/msvc-env.bat +++ b/ms-windows/osgeo4w/msvc-env.bat @@ -55,6 +55,7 @@ if not exist "%OSGEO4W_ROOT%\bin\o4w_env.bat" (echo o4w_env.bat not found & goto call "%OSGEO4W_ROOT%\bin\o4w_env.bat" call "%OSGEO4W_ROOT%\bin\py3_env.bat" call "%OSGEO4W_ROOT%\bin\qt5_env.bat" +call "%OSGEO4W_ROOT%\bin\gdal-dev-env.bat" set VS140COMNTOOLS=%PF86%\Microsoft Visual Studio 14.0\Common7\Tools\ call "%PF86%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %VCARCH%