I have a C/C++ program that\'s a plugin to Firefox. Because it\'s a plugin, it has non-main entry points. Those entrypoints need to be compiled in C because otherwise they g
This is not a kludge - this is how C/C++ compilers work. When the compiler compiles a file that uses your library, it checks the .h files for declarations of functions and globals. Hence, you wrap the .h files with extern "C" to avoid name mangling.