R-beta: linking c++ functions

Kung-Sik Chan kchan at stat.uiowa.edu
Mon Sep 15 03:14:00 CEST 1997


Many thanks for your suggestions. I have tried the trick, but got another
error message:

>  dyn.load('/usr/lib/libg++.so')
> library(chaos)
/usr/local/lib/R/bin/R.binary: '/usr/local/lib/R/bin/' is not an ELF file
Error in dyn.load(system.file("lib", name)) : unable to load shared library "/us
> traceback()
[1] "library.dynam(\"chaos.so\")"   "eval(i, env)"
[3] "lib.source(file, env)"         ".library(name, lib = lib.loc)"
[5] "library(chaos)"  

I run R in the directory /usr/local/lib/R/bin, but the same error
message pops up if I run R in directory x, with the "/usr/local/lib/R/bin"
replaced by "x".

I have no idea how to deal with this error. Any suggestions? 


> You are pretty much on your own when it comes to C++, I don't have any
> idea if what you want to do will work.  BUT, it looks like you are
> missing routines to handle streams.  You could try using "dyn.load" to
> load these missing routines from a system library before using
> 	library(chaos)
> Something like
> 	dyn.load("/usr/local/lib/libg++.so")
> may do the trick, but I really have no idea.
> I think that Doug Bates has some experience with using C++ with R ...
> 	Ross
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