I have these line in my pro*C program. The function initAverage(int i) is defined in a C language and I am trying to call this function in a .pcc (Pro C++) file.
I am getting an error
Error: initAverage(int i);was declared before with a different language
extern "C"
{
int initAverage(int i);
}
You probably have an include before that already declares
initAveragewithoutextern "C". Look at all declarations ofinitAverageand fix the missingexterndeclaration then it should be fine.PS:
Adding the calling convention explicitly is a good idea in general. I would add that too (while not being actually part of the question)