[Rd] (PR#4806)

Duncan Murdoch dmurdoch at pair.com
Mon Oct 27 21:36:55 MET 2003

On Mon, 27 Oct 2003 21:00:57 +0100 (MET), L.T.Kell at cefas.co.uk wrote :

>> I am trying to call functions written in Visual C++ from R version 1.8.0
>> under Windows. 
>> Although these functions ran correctly in version 1.7 in Version 1.8.0
>> they cause R to crash after the function has returned to R

You have a problem with the calling convention.

>> extern "C" __declspec(dllexport) SEXP __stdcall out(SEXP x, SEXP y)

R wants "cdecl", not "stdcall".

See my web page
<http://www.stats.uwo.ca/faculty/murdoch/software/compilingDLLs/> for
some advice (as well as readme.packages for VC++ advice).

Duncan Murdoch

More information about the R-devel mailing list