GNAT includes a binding generator for C and C++ headers which is intended to do 95% of the tedious work of generating Ada specs from C or C++ header files.
Note that this capability is not intended to generate 100% correct Ada specs, and will is some cases require manual adjustments, although it can often be used out of the box in practice.
Some of the known limitations include:
The code is generated using Ada 2012 syntax, which makes it easier to interface
with other languages. In most cases you can still use the generated binding
even if your code is compiled using earlier versions of Ada (e.g.
|• Running the Binding Generator:|
|• Generating Bindings for C++ Headers:|