Skip to content

Example of how to integrate gdal into a hello worldprogram

Notifications You must be signed in to change notification settings

dukesook/use_gdal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adding GDAL to your program

Add as Submodule

Build GDAL submodule

  • cd submodules/gdal/
  • mkdir build && cd build
  • cmake ..
  • cmake --build . -- -j24

Write CMakeLists.txt

  • See use_gdal CMakeLists.txt example
  • Use C++ 17: set(CMAKE_CXX_STANDARD 17)
  • Include target directories
    • gdal/gcore/
    • gdal/port/
    • gdal/ogr/h
    • gdal/build/gcore/
    • gdal/build/port/
  • Link Library
    • gdal/build/libgdal.so

main.cpp

  • #include <gdal.h>
  • #include <gdal_priv.h>

About

Example of how to integrate gdal into a hello worldprogram

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published