Cook Computing

Precompiled Libraries with Envision Eiffel

October 1, 2002 Written by Charles Cook

I've had some problem building a precompiled library with Envision. The following sequence of steps seems to work for building a simple precompile project. A different sequence, such as adding a class to the project before specifying a cluster seems to result in a project which wont build.

From the New Project dialog select Precompile Project.

On the Precompile Project Wizard indicate whether you want to use the eBCL precompile. This is a precompilation of the base class library which speeds up project builds. If you dont use the precompile one or more clusters are specified for the project according to what you select in Include Library option. Using clusters means you are including additional source files in the project and builds will take correspondingly longer. In either case once the project has been created you can change specification of the precompile and/or clusters.

Next, specify a cluster in which new classes will be placed. Open the Property Pages for the project and go to the Clusters page. Add a cluster and specify its path as the project directory (this is where new classes are placed by default),

Add one or more classes to the project.

Finally, build the project. The precompiled library will be a file with a .epr extension and will be in the debug or release directory under the project directory.

To use the precompiled library in another project, open the Property Pages for the project at the General page. The Precompiled Library Path will have defaulted to, for example, $ISE_EIFFEL\ebcl\debug. Change this to the location of the precompiled library built above.

Obviously there are a lot more choices to be made when deciding on what should go into a precompiled library but the above was sufficient to demonstrate to me how precompiles work in principle.