External Linkage

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at External Linkage.

If the first declaration at file-scope level for an identifier does not use the static storage-class specifier, the object has external linkage.

If the declaration of an identifier for a function has no storage-class-specifier, its linkage is determined exactly as if it were declared with the storage-class-specifier extern. If the declaration of an identifier for an object has file scope and no storage-class-specifier, its linkage is external.

An identifier's name with external linkage designates the same function or data object as does any other declaration for the same name with external linkage. The two declarations can be in the same translation unit or in different translation units. If the object or function also has global lifetime, the object or function is shared by the entire program.

See Also

Using extern to Specify Linkage