TranslationUnit

Cosmos utilizes "separate compilation" of individual "translation units" into "object code". Object code is then "linked" together to form either "static libraries", "dynamic libraries", or "executables".

These concepts are well known from various C/C++ tool chains on many different platforms.

A single source file (typically with the extension .cm) represents the concept of a translation unit. This differs from C/C++ where a preprocessor is typically combining a source (.c/.cpp) file with many header (.h/.hpp) files to form a translation unit.

The most profound differences of Cosmos, compared to C/C++ is in the conversion of the source files to object files. The linking steps and resulting executables and libraries are directly comparable to C/C++ tool chains, and will be able to link directly to those.

Page last modified on July 09, 2016