Search code examples
cobjective-cextern

What does the extern keyword mean?


What does the extern keyword mean? I've seen that in front of an function declaration like

extern void DoFoo ...

Solution

  • extern gives a name external linkage. This means that the object or function is accessible through this name from other translation units in the program. For functions, this is the default linkage in any case so its usage (in this context) is usually redundant.