Skip to content

(PR#4806)

2 messages · L.T.Kell@cefas.co.uk, Duncan Murdoch

#
Duncan Temple Lang correctly pointed out that the function should have been
declared as

 test<-function(x,y) .Call("out",as.numeric(x),as.numeric(y))

However, the problem is that calling any of the functions in my DLL
(compiled using MSVC C++) causes R 1.8.0 to crash; out() ws just a simple
example. The functions had previous worked under R 1.7.x. I have now
recompiled R 1.8.0 under an earlier version of MinGW and my DLL functions
now works. I therefore suspect that the problem is related to MinGW and
Windows.

Regards Laurie
#
On Mon, 27 Oct 2003 21:00:57 +0100 (MET), L.T.Kell@cefas.co.uk wrote :
You have a problem with the calling convention.
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