An alternative is to wrap the includes with the extern "C":
1 2 3
extern"C"{
#include "Cheader.h"
}
You need to do this because if the C++ compiler doesn't know it's looking at C declarations it'll try to mangle the function names, but the C function definitions won't be mangled, so when the time comes to link everything, the linker won't find the definitions.
extern "C" tells the compiler that the declarations inside shouldn't be mangled.