1

I am trying to build QGIS 3.10 on Windows x64 and follow INSTALL file.

I am getting following error

2>------ Build started: Project: version, Configuration: RelWithDebInfo x64 ------  
2>------ Build started: Project: qgis_core_autogen, Configuration: RelWithDebInfo x64 ------  
2>  Automatic MOC for target qgis_core  
3>------ Build started: Project: crssync, Configuration: RelWithDebInfo x64 ------  
3>  crssync.vcxproj -> C:\project\QGIS-release-3_12_vs14\ms-windows\osgeo4w\build-qgis-test-x86_64\output\bin\RelWithDebInfo\crssync.exe  
3>  crssync.vcxproj -> C:/project/QGIS-release-3_12_vs14/ms-windows/osgeo4w/build-qgis-test-x86_64/apps/qgis-test/pdb/crssync.pdb (Full PDB)  
4>------ Build started: Project: synccrsdb, Configuration: RelWithDebInfo x64 ------  
4>  Running crssync  
4>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code -1073741515.  
========== Build: 3 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========  

Earlier solutions as described in http://osgeo-org.1560.x6.nabble.com/Build-qgis-errors-td5219922.html unable to solve the problem as it is based on Qt4.

I had also tried Debugging QGIS from Visual Studio and https://www.shaeffer.co/compiling-qgis-on-windows but no solution.

1 Answer 1

3

Short answer: Run all the necessary batch files before starting devenv.exe from that command shell.

  1. %OSGEO4W_ROOT%\OS4Geo4W-dev.bat
  2. %OSGEO4W_ROOT%\bin\gdal-dev-env.bat
  3. devenv.exe

Long answer: I also ran into this while trying to build QGIS on Windows. Thanks to your link I was able to figure out the problem.

KaburNaj said:

The ADD_CUSTOM_TARGET(synccrsdb ...) action in QGIS/src/crssync/CMakeLists.txt file causes a command-line call to the Build/output/bin/Release/crssync.exe file during the build action for the synccrsdb package. It turns out that crssync.exe has a dependency on qca.dll so this action returns the rather uninformative error code -1073741515 (which apparently means "missing DLL").

Running crssync.exe from the command line, I got these three alert messages:

---------------------------
crssync.exe - System Error
---------------------------
The code execution cannot proceed because gdal302.dll was not found. Reinstalling the program may fix this problem. 
---------------------------

---------------------------
crssync.exe - System Error
---------------------------
The code execution cannot proceed because Qt5Core.dll was not found. Reinstalling the program may fix this problem. 
---------------------------

---------------------------
crssync.exe - System Error
---------------------------
The code execution cannot proceed because Qt5Xml.dll was not found. Reinstalling the program may fix this problem. 
---------------------------

After running %OSGEO4W_ROOT%\OS4Geo4W-dev.bat, I no longer got the missing Qt5 dlls. Only missing gdal and proj dll alerts. After running %OSGEO4W_ROOT%\bin\gdal-dev-env.bat, it runs and builds without errors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.