I know this thread is probably dead, but its still very much alive in search engines so I thought I would post some more detail. C++ mangles routine names (adds a bunch of characters) when they are compiled. I don't have the knowledge to tell you why it does that. I would guess to ensure that routines are uniquely identified among all the namespaces and classes in the program. Regardless, C does not mangle names. If you try to include a C header file in your project everything will work great during compilation, but when you link C++ will mangle the names of the routines in the C header file and try to find them in the object file for the C routines. It won't be able to find them because it expects them to be mangled.
This is most prevalent when you try to use a preexisting C library. In this case you can't recompile the C code as C++ to restore name mangling. So you have to tell the C++ compiler to look for C-style routines using 'extern "C"'. Putting it in the header file isn't necessary, but wherever a C++ compiler finds a declaration of a C routine it will need it. The header file placement is to avoid repeating yourself.
This can also happen in some IDEs. But basically results in a C library being linked with a C++ program/library. If gcc was used to compile it, g++ will have trouble figuring it out.