Compiling an ADAPL program

An .ada text file must be compiled by the ADAPL compiler adapl.exe or by Designer or by the ADAPL Debugger to create an executable program.

Compiling with Axiell Designer

An opened .ada text file in Designer can be compiled normally either by pressing F6 or by right-clicking the ADAPL code and choosing Compile in the pop-up menu. You can also compile it in debug mode by pressing Ctrl+F6 or by right-clicking the ADAPL code and choosing Compile with debug mode in the pop-up menu. The compiled file will be placed in same folder as the ADAPL source code file.

Compiling with adapl.exe

Compiling with adapl.exe needs to be done from the (DOS) command prompt**, so you'll have to open a command-line window first via the Windows Start menu. Using standard DOS commands in this window, go to the directory that holds the .ada text file that you want to compile. Now call adapl.exe, which is probably in your application's \bin, \executables or \tools folder, and use the .ada file name as the main argument. You can use a full or relative path to adapl.exe. To compile the notify.ada file, use for example:

"C:\axiell software\executables\adapl" notify.ada

or

..\executables\adapl notify.ada

The basic syntax for starting the ADAPL compiler is:

adapl [arguments] filename

With the arguments you can indicate that something extra must happen during compilation. An argument consists of a hyphen and one or more characters. Entering an argument is optional. In most cases, the compiler will compile the .ada file perfectly well without arguments. For the file name fill in the source .ada text file. You can leave out the extension, because the file to be compiled cannot have any other extension. The simplest form of a compile command will look something like this if both adapl.exe and test.ada are in the same folder:

adapl test.ada

If compiling was successful, the compiler will give a message similar to the following:

[ADAPL 7.6.23264.1 (x86), Built at Sep 21 2023,10:38:33.]
[Copyright (c) 1984-2018, Axiell ALM Netherlands]
[0 errors and 0 warnings in 311 lines (..\[path]\[filename])]

If there were errors during compilation, no .bin file will have been created. You'll will have to re-examine your code, fix the error(s) and recompile the adapl.
If there were only warnings, the adapl will have been compiled correctly: warnings often warn against declared variables which you never use, for example, but those are not errors. Another warning is of the type: WARNING: at line 34 of borrstor.ada, unable to read dictionary field list COPIES, error 16. This is also just a warning, not an error, which occurs if you compile an adapl in a folder from which the compiler is not able to locate your \data folder by means of your FACS declarations: in the FACS declarations in your adapl, the path to the \data folder is usually relative, like fdstart BORROWER '../data+borrower'. This is not a problem if you've only used tags in your FACS declarations, like you normally do: it just means that the compiler was not able to check your declarations against the .inf files in the \data folder.

The compiled adapl will have been created in the folder where you currently are. In current Collections model applications that is usually exactly the place where it should be, but older or custom applications often have compiled adapls in other folders. Sometimes even, copies of the same compiled adapl reside in multiple folders. If your adapl didn't exist before, you can place it in a suitable folder of your choice, but if you updated an existing adapl, you must check all your application (sub)folders for the older version of the adapl and overwrite it with the new version; all of the older versions must of course be identical, otherwise you may lose changes in a deviating older version.

The following command-line arguments can be used with adapl.exe:

Argument

Name

Description

-d

Debug

The compiler prepares the .bin file for debugging. Only adapls compiled in debug mode will automatically launch in the ADAPL Debugger* when the adapl is executed by Adlib for Windows, by import.exe or by Designer's import functionality (the latter available from Designer version 7.1). The ADAPL Debugger is not functional for Axiell Collections: for Collections, a different debugging mechanism is available for adapls compiled in debug mode.
When, after debugging, your adapl runs fine, remember to recompile it without the -d option, so that executing the adapl won't start the debugging functionality.

-h

Help

The compiler displays a Help text.

-t

Title

The compiler prompts for an ADAPL program title. You can enter one title for each language: title[x]='title', with x representing the language number. This option is obsolete.

-v

Verbose

The compiler gives progress information during compilation.

It is possible to enter more than one argument, for example:

adapl -dtv test.ada

If a single source file name is entered, this file will be compiled by adapl.exe. If no errors are found, the resulting output will be written to a file with the same name, but with the extension .bin . This .bin file will contain the executable form of the ADAPL program. If an error occurs during compilation, a message will be displayed stating the type of error and the line in which it occurs.

You may also compile multiple files at once, and wildcards are supported. The compiler will compile all given files separately and write each of them to the current folder as .bin files. For example: the adapl *.ada command compiles all files with the extension .ada into executable files with the original name but with the extension .bin.

* The ADAPL Debugger provides a programmer-friendly way to debug adapls for Adlib for Windows (not Collections). See the ADAPL Debugger manual for more information about this tool.

** From Windows Explorer you can also compile adapls by right-clicking an .ada file and choosing Open with... > ADAPL Compiler in the pop-up menu; if ADAPL Compiler is not present in this menu, you'll have look for adapl.exe on your system first. However, compiling an adapl this way does not allow you to enter command-line arguments, so you can't compile an adapl in debug mode this way.