Compiling an adapl

An .ada text file must be compiled by the ADAPL compiler adapl.exe, 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 (which is required for the ADAPL Debugger) 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. Go to the directory that holds adapl.exe, probably your Adlib \bin, \executables or \tools directory, and enter the desired command. The syntax for starting the ADAPL compiler is:

adapl [arguments] [<path>]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 program perfectly well without arguments. For the file name, fill in the source .ada text file name. 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:

adapl test.ada

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 the Adlib application or by import.exe (not by Designer's import functionality though).
When, after debugging, your adapl runs fine, remember to recompile it without the -d option, so that executing the adapl won't open the ADAPL Debugger anymore.

-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.

-v

Verbose

The compiler gives progress information during compilation.

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

adapl -dtv C:\Adlib\adapls\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 directory as .bin files. For example: the adapl *.ada command compiles all files with the extension .ada into executable files with the same name yet with the extension .bin.

If compilation was successful, the compiler will generate a message stating 0 errors. Warnings do not prevent successful compilation. See the image below for an example of the docustor adapl having been compiled twice, once without options and once in debug mode. (In this example, the .ada file to be compiled has been copied to the folder where adapl.exe resides, so that a path in front of the ADAPL file name is not needed.)

Compilation_from_DOS

The adapl will have been created in the directory containing the .ada file. If that folder is not the adapls folder of your Adlib application, then you will have to copy the compiled adapl to that directory. In any case, (re)start the application to be able to observe the newly compiled adapl functioning within its context.

* 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.