C header files must be wrapped in extern "C" directives before they are called from C++.
extern "C"
This section describes:
Including system C header files
Including your own C header files.