I have a C++ function defined in a .h file as follows and implemented in a .cpp file:
extern "C" void func(bool first, float min, float* state[6], float* err[6][6])
{
//uses vectors and classes and other C++ constructs
}
How can I call func in a C file? How do I set up my file architecture / makefile to compile this?
Thanks!
{ }), or is it declared in the header (i.e., ending with);)? If it's the former, you need to write another header file that omits theextern "C"and{ }part, and use that for the C part of your program.