Compilation means converting a source code of an MQL4/MQL5 program into the machine language. The result is an executable program file (*.EX4 or *.EX5) that can be launched in a trading platform.
Compilation consists of several stages:
To obtain an executable program file, open the main source file or project via Navigator and click Compile in the File menu or F7. The compilation process protocol is displayed on the Errors tab of the Toolbox window. If сompilation has passed with no errors, you can run the obtained program in the trading platform.
If there are errors or warnings, they are displayed on the Errors tab.
Compilation errors are marked with both on the Errors tab and in the appropriate piece of code. No executable program file (*.EX4 or *.EX5) is created if they occur. To go to a string with an error, double-click on the error or click Go to Line command in the context menu. The string and the column where an error is detected are displayed in the appropriate columns.
Warnings marked with icon indicate places of potential errors. These are the source code segments that can be misinterpreted (for example, an implicit value type change). You can go to such a code string exactly the same way as in case with errors.
icons stand for various info messages, for example, messages about include files the program accessed during compilation.