Using extern C
in C++
In C++, when using C libraries (with source code) do the following in the header file that is being #include
d
#ifdef __cplusplus
extern "C"
{
#endif
//content of header file
#ifdef __cplusplus
}
#endif