Ok. Thanks for the help guys. This is the spirit of open source . I did google and found some answers.
If you are including a C header file that isn't provided by the system, you may need to wrap the #include line in an extern "C" { /*...*/ } construct. This tells the C++ compiler that the functions declared in the header file are C functions.
Code:
// This is C++ code
extern "C" {
// Get declaration for f(int i, char c, float x)
#include "my-C-code.h"
}
int main()
{
f(7, 'x', 3.14); // Note: nothing unusual in the call ...
}
here is the link for the page.
http://www.inf.uni-konstanz.de/~kueh...c-and-cpp.html
http://gcc.gnu.org/ml/gcc-help/2001-11/msg00092.html - this page has a good explanation of technical complexities involved in mixing c and c++ and tells how to that too.
Thanks
I Salute the open source community
Johnnyde