"It should not work in C. extern C is a C++ thing; it tells the compiler to treat whatever follows as if it were C, to avoid name mangling." . . . .