Displaying 1 result from an estimated 1 matches for "myfun64".
2011 Dec 12
2
Problems in building a DLL in 64-bit Windows
...2-14.0 and 2-13.0
The complete source code is
/*
* myfun.c
*/
#include <stdio.h>
#include <R.h>
#include <Rinternals.h>
#include <R_ext/Rdynload.h>
void myfn(double *x){ *x += 1; }
The DLL is build like this:
R CMD SHLIB -LC:/PROGRA~1/R/R-214~1.0/bin/x64 -lR myfun.c -o myfun64.dll
and get the error message above.
The R code:
#
# myfun.R: this works with i386, but not with x64
#
dyn.load("myfun64.dll")
f <- function(x) {.C("myfn", x=as.double(x))$x}
f(1)
f(1000)
dyn.unload("dllmain.dll")
I am trying to build a package, or at least a se...