Automatic template instantiation for cross compilation is provided. More
particularly, a routine (40) on a development computer system (10)
extracts template information from source code (22). The routine (40)
uses the template information to generate template source files (56, 56A,
56B), which may then be compiled with a cross compiler (20) to provide
object code (54, 54A, 54B). Owing to one or more templates being
dependent on one or more other templates, the routine is repeated until all templates,
and their associated dependencies, are compiled into object code (54B) with
the cross compiler (20). This object code is then portable from the development
computer system (10) to a target computer system (60) for automatic
template instantiation. Moreover, a template repository (52) is used to
hold in part the template information. By centrally locating template information,
duplicate templates may be avoided to conserve data resources.