Yes, it's possible. However, you must explicitly tell the C++ that a function is a C function. You do this by declaring it as follows:
extern "C"
{
void my_function(void);
}
To ensure that header files work properly under both C and C++, they are typically written as:
#ifdef __cplusplus
extern "C"
{
#endif
void my_function(void);
#ifdef __cplusplus
}
#endif