[R] passing arguments to R CMD SHLIB
Faheem Mitha
faheem at email.unc.edu
Tue Oct 9 21:31:16 CEST 2001
Dear People,
Earlier this year I wrote asking about how to pass arguments to R CMD
SHLIB. I received the reply that one way was to add arguments to the file
Makevars in the compilation directory. I'm having a related problem.
I want to compile up the following shared library. The Makefile has
all: mh.so
mh.so: mh.c mh.h
R CMD SHLIB mh.c
Makevars contains
PKG_CPPFLAGS=-O2 -Wall -pedantic
the compilation gives
gcc -I/usr/lib/R/include -O2 -Wall -pedantic -I/usr/local/include
-mieee-fp -D__NO_MATH_INLINES -fPIC -g -O2 -c mh.c -o mh.o
However, I want to link it to a shared library, ie. I want
gcc ... mh.c -lgslcblas
"R Extensions" says that the variable PKG_LIBS can be used for additional
`-l' and `-L' flags to be passed to the linker when building the shared
library. I added a line to Makevars like
PKG_LIBS=-lgslcblas
and other variations, but everything I do is completely ignored. I am at
my wits end. Is PKG_LIBS really the correct variable, and if so, what is
the correct syntax?
Thanks in advance.
Sincerely, Faheem Mitha.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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