OSGeo / gdal

GDAL is an open source MIT licensed translator library for raster and vector geospatial data formats.
https://gdal.org
Other
4.77k stars 2.5k forks source link

C++ API documentation doesn't say which header files to include #10431

Closed eschnett closed 3 weeks ago

eschnett commented 1 month ago

What is the bug?

The C++ API documentation on the web doesn't say which header files to include. I assume that a #include <gdal.h> should suffice for everything but I might be wrong.

Steps to reproduce the issue

I want to call GetGDALDriverManager from C++ with GDAL 3.9.1. Just using #include <gdal.h> isn't enough. #include <gdal_priv.h> does the trick, but that file name doesn't as if it should be included.

Versions and provenance

GDAL 3.9.1, released 2024/06/22, built from source, on Ubuntu Linux 22.04.

Additional context

No response

ctoney commented 1 month ago

The Raster and Vector API Tutorials help a bit with that, e.g., #include "gdal_priv.h" in https://gdal.org/tutorials/raster_api_tut.html

But the doxygen documentation at https://gdal.org/doxygen/ is a good resource.