Skip to content
Prev 162442 / 398500 Next

C++ code from R

Rainer M Krug wrote:
You should compile all the files into one single .so
So use the first call to R CMD SHLIB, i.e. (with the order
of the files switched)

   R CMD SHLIB emdL1_R.cc emdL1_R.cc

and then in R

   dyn.load("emdL1_R.so")

should work.

The problem was that in the second SHLIB call,
you compiled and linked emdL1_R.cc into emdL1_R.so but didn't
include the emdL1.cc file which contains the classes and routines you
refer to in emdL1_R.cc

  D.