[R] Shared libraries for use with R

Giovanni Petris GPetris at uark.edu
Fri Jan 18 23:04:35 CET 2002


> > Fri<15:07>gpetris[291]>nm -pg tryit.so
> >
> >
> > tryit.so:
> > 0000000000 U __1cG__CrunVdo_exit_code_in_range6Fpv1_v_
> > 0000000000 U __1cH__CimplKcplus_fini6F_v_
> > 0000000000 U __1cH__CimplKcplus_init6F_v_
> > 0000068252 D _DYNAMIC
> > 0000068474 D _edata
> > 0000068488 B _end
> > 0000002587 D _etext
> > 0000000000 U _ex_deregister
> > 0000000000 U _ex_register
> > 0000002436 T _fini
> > 0000068124 D _GLOBAL_OFFSET_TABLE_
> > 0000002356 T _init
> > 0000002568 D _lib_version
> > 0000068152 D _PROCEDURE_LINKAGE_TABLE_
> > 0000001992 T create
> > 0000000000 U dgemm
> > 0000000000 U dmatrix
> > 0000000000 U fprint
> > 0000002120 T MatMult
> > 0000000000 U messdoublematrix2
> 
> So dmatrix was not linked in.  What's fprint (not fprintf) by the way?
> 
And dgemm isn't linked in either. And that is a function in sunperf. 
What am I missing? How should I do to link them in? Is there any
flag that I need to add to R SHLIB?
Do I need to do something else before being able to dyn.load-ing the
library? Thank you very much, Giovanni

This is my R SHLIB command:

Fri<15:56>gpetris[298]>R SHLIB tryit.c
cc -I/export/home/share/R/R-1.4.0/lib/R/include -I/export/home/gpetris/C -I/usr/local/include -I/export/home/share/include   -KPIC  -xO5 -dalign -xlic_lib=sunperf -c tryit.c -o tryit.o
cc -G  -o tryit.so tryit.o -L/export/home/gpetris/lib/SUN/32bit -lutil -lrand -L/usr/local/lib -L/export/home/share/lib  
Fri<15:56>gpetris[299]>cat Makevars 
PKG_CPPFLAGS=-I$(HOME)/C
PKG_LIBS=-L$(HOME)/lib/SUN/32bit -lutil -lrand



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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