Map File

Any class file can optionally have a corresponding Map file. It contains information used by the build system. A map file has the same name as the class, but with a ".cmg" suffix. When a class is imported the builder looks at the class map file to determine where it is located. Directory paths can be relative or absolute.

Map files allow you to restructure source code without changes to the code itself. While developing a program, maps make it easy to switch between an alternate or stubbed version of a class. A map file has the form:


Not all instances of Import declarations require a map entry. A mapping is only needed for one instance of an import within a build. Even then, when the imported classs is in the same directory no mapping is needed. Libraries generally provide mappings for all their public classes.

Build a Library

Data File