I solved the issue. I was trying with extern "C" in front of the function declarations but the compiler comained. I did it by adding the #ifdef __cplusplus bracketing and it links fine. Yves