Compiling a Project

There are several ways to compile a project. If you run it (by pressing F9 or clicking on the toolbar icon), Delphi will compile it first. When Delphi compiles a project, it compiles only the files that have changed. If you select Compile | Build All, instead, every file is compiled, even if it has not changed. This second command is seldom used, since Delphi can usually determine which files have changed and compile them as required. The only exception is when you change some project options. In this case you have to use the Build All command to put the new options into effect.

The project lists the source code files that are part of it, and any related forms. This list is visible both in the project source and in the Project Manager, and is used to compile or rebuild a project. First, each source code file is turned into a Delphi compiled unit, a file with the same name as the Pascal source file and the DCU extension. For example, Unitl.pas is compiled into Unitl.dcu.

When the source code of the project itself is compiled, the compiled units that constitute the project are merged (or linked) into the executable file, together with code from the VCL library. You can better understand the compilation steps and follow what happens during this operation if you enable the Show Compiler Progress option. You'll find this option on the Preferences page of the Environment Options dialog box, under the Compiling heading. Although this slows down the compilation a little, the Compile window lets you see which source files are compiled each time (unless your computer is too fast; Delphi might compile several files per second on a fast PC).

Compiling

Project:

C:\..ABorland\Delphi6\Projects\Project1.dpr

Done:

Compiled.

Current line:

0

Total lines:

15

Hints:

0 Warnings:

0 Errors:

0

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment