Hello! I want R to call some functions from my DLL, which is written on C++ using Microsoft Visual C++ 6.0. I've looked through "Writing R extensions" manual and "FAQ for Windows". I achieved, that R can call void functions without parameters from my C++ DLL. Then I included R headers files to my DLL project, I was going to use SEXP type: #include "Rinternals.h" #include "R.h" And as a result, my DLL can't be compiled, the error is: C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\math.h(514): error: this declaration may not have extern "C" linkage template<class _Ty> inline ^ Would you please give me a peice of advise how to handle this problem?