extern int foo(int a, char* b);The form extern int foo(); means that foo takes no arguments, rather than arguments of an unspecified type and number. In fact, some advise using a C++ compiler even on normal C code, because it will catch errors like misused functions that a normal C compiler will let slide.
extern "C" int foo(int a, char* b);Otherwise the C++ compiler will alter the name in a strange manner.