The cross-compiler consists of three programs, the CLI names are:

  • AL2XML.exe
  • GenerateSymbols.exe
  • XML2CAL.exe

To cross-compile AL to C/AL code you will have to execute them in the given order. 

Powershell commands will be available shortly, we’ll update the documentation.


The first step in the cross-compilation is to generate the intermediate XML format from your AL source files. If you want to use the pre-processor you have to execute that before.

You can either use a single file or a directory as input / and output.

AL2XML.exe -i InputDir\ -o OutputDir\

If the input is a directory the program will search for all files with the extension .al in the given directory and all sub-directories.

If the output is a single file the program will combine the input in one file, if the output is a directory the program will create files matching the input .al files, but with the extension .xml.

Generate Symbols

The second step is to generate a symbol lookup table. This table is necessary to generate C/AL code from AL. Is is a lookup table between object type, ID and name.

GenerateSymbols -f InputFolder\ -o LookupTable.xml


The last step is to generate the C/AL text files from the intermediate files.

XML2CAL.exe -i InputFolder\ -o OutputFile.txt -s 50000 -r LookupTable.xml -t Translations\

The parameters are:

  • -i: Input folder (all .xml files are handled as input)
  • -o: Output file
  • -s: Start ID for object and controls (50000, if you’re not sure)
  • -l: Default language code (defaults to ENU)
  • -t: Translation folder containing XLIFF files
  • -d: Target Dynamics version 
    • 6 = Microsoft Dynamics NAV 2009
    • 7 = Microsoft Dynamics NAV 2013
    • 7.1 = Microsoft Dynamics NAV 2013 R2
    • 8 = Microsoft Dynamics NAV 2015
    • 9 = Microsoft Dynamics NAV 2016
    • 10 = Microsoft Dynamics NAV 2017
    • 11 =  Microsoft Dynamics NAV 2018
    • 13 = Microsoft Dynamics 365 Business Central
  • -f: “Version List” string for generated text files
  • -r: Lookup table file generated by GenerateSymbols.exe

Need help?

Pleaser don’t hesitate to contact us, we try our best to help you!