I cannot understand why a function appears to be available to R
(is.loaded('planckwR') returns TRUE) but the call with .C results in an
error message:
C symbol name 'planckwR' not in DLL for package <path to DLL file here>
This is what I do:
Loading a homebrewed DLL, compiled with MS VS97. The functions are all
void, the C calling sequence is used and all arguments are passed by
reference. Done things much like this many times with both Fortran and C
subroutines and functions and called those successfully from either VBA
or Python.
R code like this:
++++++++++++++++
dllpath<-file.path('path to dill', paste('Planck',
.Platform$dynlib.ext,sep=''))
dll<-dyn.load(dllpath)
dllinfo<-getLoadedDLLs()
is.loaded('planckwR')
getNativeSymbolInfo('planckwR')
+++++++++++++++++++++
is.loaded returns TRUE.
getNativeSymbolInfo returns the name and a pointer to the address of the
function planckwR. The $package element of the list returned by
getNativeSymbolInfo is NULL, which adds to my confusion as it should be
a list of 3 elements.
What am I missing here? All help much appreciated.
Alex van der Spek
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.