[R] Interfacing R and C++ under Windows

Pijus Virketis pvirketis at hbk.com
Fri Jan 3 14:52:02 CET 2003


Dear all, 

My colleague, who has been helping me with wrapping some older C++ code for use in R, has been running into some issues, which he asked me to post here:

- ERROR is defined in RS.h which is included in Rdefines.h which conflicts with Visual Studio's ERROR
- TRACE is defined in Rinternals.h which conflicts with Visual Studio's TRACE
- math.h is included within extern "C" linkage in R.h, however Visual Studio's math.h includes templates which are only valid in C++

Basically, he feels that there are some clear conflicts between what R expects of C++ and what Visual C++ does. So, while the simpler .C technique can be used, the .Call approach does not work. What are we missing here? 


Thank you!

Pijus




More information about the R-help mailing list