Previous: Search Paths for gnatbind, Up: Binding with gnatbind


4.5 Examples of gnatbind Usage

This section contains a number of examples of using the GNAT binding utility gnatbind.

gnatbind hello
The main program Hello (source program in hello.adb) is bound using the standard switch settings. The generated main program is b~hello.adb. This is the normal, default use of the binder.
gnatbind hello -o mainprog.adb
The main program Hello (source program in hello.adb) is bound using the standard switch settings. The generated main program is mainprog.adb with the associated spec in mainprog.ads. Note that you must specify the body here not the spec. Note that if this option is used, then linking must be done manually, since gnatlink will not be able to find the generated file.