Compiling Applications

Once you have created a program source-code file, you must compile it into executable form for the DataFlex virtual machine to execute. This executable file is created by the DataFlex Compiler.

The compiler reads the source file and produces 2 files with the same rootname as the source file, in the Programs directory of the workspace:

 

If errors occur during compilation, the compiler creates a third file with the same rootname as the source file, in the AppSrc directory:

 

Compiling from within the Studio

The Studio includes an integrated compiler. You can compile the current project by selecting Project -> Compile from the menu, or click the compile toolbar button. The Studio also automatically compiles the project if changes are detected when you select Debug -> Run from the menu or click the Run toolbar button.

The compiler progress and output is displayed in the Output Window. If errors occur during compilation, the error will also be displayed in the Output Window. Double-clicking on an error listed in the Output Window will automatically open the specified source file and locate the line of error.

 

Compiling from outside the Studio

If you launch the compiler from a command line (using DFComp.exe) it functions differently from the integrated compiler.  

Please see Launching the Compiler Outside the Studio for details.

 

Compiling with the Console Compiler

DataFlex includes compilers (32 and 64-bit) that are specifically designed to be used in automated build processes by directing the output to the console and setting an error level on exit.

Please see Console Compiler for details.

 

Handling Compiler Errors

To learn how to resolve compiler errors, see Handling Compiler Errors.

For a listing of compiler errors and solutions, see Compiler Errors.

 

Topics in this book: