[R] Dyn.load of sharing object with GSL library
moghadameh_mirzai at yahoo.com
Sun Jun 9 09:27:10 CEST 2013
I want to use shared library of gsl in R(2.15.1) on unix .I have a makefile such as
CC = gcc
CFLAGS = -fPIC -O2
PKG_LIBS -lgsl -lgslcblas -lm -lpthread
OBJS_SPB = calc_spb.o k.o dk.o ddk.o
calc_spb.so : $(OBJS_SPB)
$(CC) -shared -o calc_spb.so $(LIBS) $(OBJS_SPB)
rm -f ../*.o *.o
rm -f *.so
I use R CMD SHLIB calc_spb.c in terminal window of unix and in my directory was built calc_spb.o and calc_spb.so.
And I use dyn.load in R the error is
Error in dyn.load(“calc_spb.so”):
Unable to load shared object ‘/home/mir/cal/calc_spb.so’:
/home/mir/cal/calc_spb.so: undefined symbol :gsl_finite
Thanks to all who tried to help me in solving my problem.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: A problem.pdf
Size: 4392 bytes
Desc: not available
More information about the R-help