[Rd] Linking to native routines in other packages
Gregor Kastner
gregor.kastner at wu.ac.at
Wed Jan 22 11:53:41 CET 2014
Dear all,
in my package 'stochvol' I have unsuccessfully been trying to make a C
routine called 'sampler' available to be called from other packages' C code.
Following
http://cran.r-project.org/doc/manuals/R-exts.html#Linking-to-native-routines-in-other-packages
I have included
#include <R_ext/Rdynload.h>
R_init_stochvol(DllInfo *dll) {
R_RegisterCCallable("stochvol", "sampler", (DL_FUNC) sampler);
}
in some file within stochvol's 'src' directory, and
DL_FUNC stochvol_sampler = R_GetCCallable("stochvol", "sampler");
in some file within the 'src' directoy of the package depending on stochvol.
When installing that package, I however get:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
function 'sampler' not provided by package 'stochvol'
Can somebody give me a hint what I am missing?
Thanks a ton in advance!
Gregor
More information about the R-devel
mailing list