Opened 7 years ago
Closed 7 years ago
#6821 closed defect (invalid)
Building GDAL in Microsoft Visual Studio 2013
Reported by: | Teva | Owned by: | warmerdam |
---|---|---|---|
Priority: | highest | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
Hello,
I have been trying to build GDAL from source code. The following are the steps that I followed. I have been using visual studio 2013 but, I don't see the makefileproj_vs12 solution file after I followed the steps.
Please help me to build GDAL in visual studio.
Thanks, Teva
Steps for generating Visual Studio GDAL =======================================
- Get the GDAL source. The download instructions are on the GDAL site.
- Unzip it to create your GDAL folder, e.g. "gdal-2.0.0"
- Open a command prompt, go to that folder.
nmake -f makefile.vc nmake -f makefile.vc devinstall
- Use makegdal_gen.bat script available in GDAL source code tree:
Parameters:
1 : Visual C++ version is not the same as Visual Studio version ( => 10.0 ) 2 : Windows platform 32 for Win32 and 64 for Win64 3 : Base file name, with no path and no extension (*)
Examples:
makegdal_gen.bat 10.1 32 makefileproj_vs10 makegdal_gen.bat 11.0 32 makefileproj_vs11 makegdal_gen.bat 12.0 32 makefileproj_vs12 makegdal_gen.bat 14.0 32 makefileproj_vs14
- configure nmake.opt (or nmake.local) as usual
- execute: makegdal_gen.bat 14.0 32 makefileproj_vs14
- Launch VS2015 IDE File > Open > Project/Solution...
- Select makefileproj_vs14.vcxproj
- You may also have to add in Windows SDK library paths in the project's "VC++ Directories" configuration properties
For questions use the gdal-dev mailinst list or gis.stackexchange.
There has been very recent work in GDAL trunk regarding makegdal_gen.bat renamed as generate_vcxproj.bat : https://trac.osgeo.org/gdal/wiki/GeneratingVisualStudioProject