Building GDAL with Visual Studio 2013 and 2015

Unfortunately, GDAL 2.0.1 does not build with VS2015. I tried to build it with the following command from Command Prompt:

nmake /f

having gdal-2.0.1 as the current directory. Build has taken some significant time, but finally got some liker error “odbccp32.lib(dllload.obj) : error LNK2019: unresolved external symbol __vsnwprintf_s referenced in function”:

building GDAL with VS2015

Of cause, VS2015 is not listed on GDAL Supported Compilers page. The highest supported version of VS at the time of writing this article is VS2012. Nevertheless, I also tried to build it with VS2013 and looks like the build completed successfully:

building GDAL with VS2013

at least I can see gdal200.dll at the root directory and the following utilities in apps folder: gdal_contour.exe  gdal_grid.exe  gdal_rasterize.exe  gdal_translate.exe  gdaladdo.exe  gdalbuildvrt.exe  gdaldem.exe  gdalenhance.exe  gdalinfo.exe  gdallocationinfo.exe  gdalmanage.exe  gdalserver.exe  gdalsrsinfo.exe  gdaltindex.exe  gdaltransform.exe  gdalwarp.exe  nearblack.exe  ogr2ogr.exe  ogrinfo.exe  ogrlineref.exe  ogrtindex.exe  testepsg.exe

Another alternative to build GDAL is to generate VS projects with makegdal_gen.bat from GDAL root directory:

makegdal_gen 10.00 64 > gdal10.vcproj

and open gdal10.vcproj in VS.

Leave a Reply

Your email address will not be published. Required fields are marked *