Because template function names need to be decorated with additional information, and extern "C" turns decoration off. The purpose of extern "C" is to be able to declare functions that can be called with C linkage, which is something that will never work with a template function obviously.