[R] DLL's and WINAPI

james.pigott@ucd.ie james.pigott at ucd.ie
Tue Mar 2 17:44:10 CET 1999


The reason i had problems running C++ DLL's in R was that i had 
defined my functions using the WINAPI command, e.g. 

void __export WINAPI  fname ( int x[10][2], int y[10] ) 
{
....
....
}

I thought i could use WINAPI so that the name of the function 
("fname") would remain unchanged when called in R which it does, 
but it also implements the standard calling convention, (as 
opposed to the C calling convention) which was the source of my 
problems.
Also my dll's weren't portable because I had dynamically linked in 
some libraries.

james



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list