Generating Visual Studio Project
Use https://github.com/OSGeo/gdal/blob/master/gdal/generate_vcxproj.bat script available in GDAL source code tree to generate project files (.vcxproj) for Visual Studio 2015 or later.
The script generates Visual Studio External Project (aka Makefile Project) generated project. Makefile Project almost entirely relies on build configuration defined in GDAL nmake.opt
(or nmake.local
) and makefile.vc
files.
Usage: generate_vcxproj ^<Visual C++ version^> [32^|64] ^<^(*^) project file name^> Parameters: 1 : Visual C++ version is not the same as Visual Studio version ^( =^> 14.0 ^) 2 : Windows platform 32 for Win32 and 64 for Win64 3 : Base file name, with no path and no extension ^(*^) Examples: generate_vcxproj 12.0 64 gdal_vs2013 (not guaranteed to work) generate_vcxproj 14.0 64 gdal_vs2015
- Edit
nmake.opt
(ornmake.local
) to configure desired build options. - Generate projects:
generate_vcxproj.bat 14.0 32 gdal_vs2015
gdal_vs2015.vcxproj
is generated.- If you build source tree checked out from the repository with autotest folder included, then also
gdal_vs2015_test.vcxproj
is generated for makefile inautotest/cpp
folder with GDAL C++ tests.
- Launch Visual Studio IDE
- Go to File > Open > Project/Solution...
- Open project
gdal_vs2015.vcxproj
. - Add project
gdal_vs2015_test.vcxproj
to the solution. - Configure Build Dependencies to build the main project before the test project.
- Optionally, you may also have to add in Windows SDK library paths in the project's "VC++ Directories" configuration properties.
- Save solution in .sln file.
- Build.
Last modified
4 years ago
Last modified on Oct 31, 2018, 1:53:06 AM
Note:
See TracWiki
for help on using the wiki.