[R] dyn.load problem
Martyn Plummer
plummer at iarc.fr
Mon Jan 17 18:06:21 CET 2000
On 17-Jan-00 Joerg Kindermann wrote:
> Hi,
>
> I'm trying to write modified versions of R save/load functions which read
> from/write to a char array instead of a file pointer. I want to compile
> my functions into a library and dyn.load them. Of course the new functions
> mySave/Load will use some of the internal R functions used by save/load,
> for example "MarkSave" (to be found in .../src/main/saveload.c). I
> declared them as
>
> external void MarkSave(SEXP s);
> ....
>
> in my code. When I do dyn.load("myLib.so") I get the error
>
> Error in dyn.load(x, as.logical(local), as.logical(now)): unable to load
> shared
> library "myLib.so":
> myLib.so: undefined symbol: MarkSave
>
> Can't I use R internals other than those visible in $R_HOME/include?
MarkSave is declared static in saveload.c, so it's not surprising you
can't access it. In general you are probably better off using only the
functions declared in, e.g., Rinternals.h, since this defines an interface
to R.
Martyn
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list