To build an application, you need to compile its programs and link them to a run-time system. In the IDE, you use a build configuration to define how to do this.
The
Micro Focus Compiler goes through the following phases:
Building native COBOL applications
When building native COBOL applications, the Compiler first checks the program for syntax errors. Then, it generates native machine code. Finally, the linker links the native machine code into an executable (either an .exe or a .dll).
- The check phase - the Compiler checks the program's syntax and creates files to use for testing and debugging. The check phase creates a dictionary file for use with the Debugger and, if you are building an INT/GNT project or have set the project output type to INT/GNT, it can produce an
.int file.
- The generate phase - during the generate phase, the Compiler creates native machine code from the intermediate code produced during the check phase, and produces either an industry-standard .obj file or, if you are building an INT/GNT project or have set the project output type to INT/GNT, it can produce a
Micro Focus
.gnt file.
You can execute
.int and
.gnt code directly with the run-time system.
You cannot execute the object code file. You must link it with the appropriate run-time system to create an executable file.
- The linking phase - during the link phase, the code is linked to the run-time system and creates an executable file - an
.exe,
.dll.
You specify how to link your applications within the IDE and on the
COBOL Link page in your project's properties.
Note: By default, if your application is set to produce INT/GNT output, it compiles to
.int code in the Debug configuration, and to
.gnt in the Release configuration.
Building managed COBOL applications
When building
.NET COBOL applications the Compiler compiles your code to Microsoft Intermediate Language (IL) source file which is stored in an assembly file - either an
.exe or a
.dll.
Building in the IDE and from the command line
Enterprise Developer projects are in MSBuild format and you can build them either in Visual Studio or at the command line using either the 32-bit or the 64-bit version of MSBuild.
Parallel Building
- Building Projects in Parallel
- Parallel building in Visual Studio enables you to build multiple projects faster on multi-CPU machines. To optimize the build process, the maximum number of parallel project builds is automatically set to the number of CPUs of your computer, the maximum being 32.
You can configure the number of parallel project builds from
Tools > Options > Projects and Solutions > Build and Run.
In order for your multi-project solutions to build in parallel successfully, ensure that the project dependencies and build order are set correctly for your solution using
Project > Project Dependencies.
For more details about building projects in parallel in Visual Studio or using MSBuild from the command line, see the Visual Studio help.
Restriction: Parallel builds are not supported
in Mainframe Subsystem projects.
- Compiling the Files in a Project in Parallel
-
Restriction: Multi-processor compilation of the sources in a project is only supported for native COBOL. It is not recommended to use with native Object-Oriented COBOL applications.
You can compile your COBOL source code faster on multi-CPU machines if you enable parallel compilation inside a project.
To enable parallel compilation, check the
Multi-processor compilation option on the
COBOL page in your project's properties. Also, specify the number of
Maximum concurrent COBOL compilations option in
Tools > Options > Micro Focus > Projects where, by default, the number is automatically set to the number of CPUs of your computer.