Program linkage

Linkage determines whether identifiers that have identical names refer to the same object, function, or other entity, even if those identifiers appear in different translation units. The linkage of an identifier depends on how it was declared. There are three types of linkages:

Linkage does not affect scoping, and normal name lookup considerations apply.

C++ only

You can have linkage between translation units written in different programming languages, which is called language linkage. Language linkage enables the close relationship among all ILE languages by allowing code in one ILE language to link with code written in another ILE language. In C++, all identifiers have a language linkage, which by default is C++. Language linkage must be consistent across translation units. Non-C or non-C++ language linkage implies that an identifier has external linkage. For IBM® i specific usage information, see "ILE Calling Conventions", chapter 25 in ILE C/C++ Programmer’s Guide.

End of C++ only

Related information



[ Top of Page | Previous Page | Next Page | Contents | Index ]