Hi

I have sent a previous email "Error in dyn.load()" for which, shame on
me, I later found a partial answer.
I have been trying to look into what I exactly need to include into
Makevars and where
it needs to be located and have not found a satisfying answer yet.
Maybe the following questions
are helpful for other people as well.

Again, I am trying to include a C function tools.c into a main.c file
which needs to be run via R.
I include the header file via #include tools.h .
What I understood is that I need another file which specifically links
the header file
with the tools.c files (or .o file?). My questions are thus:

1. Can I just create a file Makevars with the variable
PKG_LIBS=-L/directory_of_tools -l/tools?
2. Does this file need to be located in the same directory as main.c?
3. When I then run the command R CMD SHLIB it does not make use of
Makevars. So what do I need to add?
4. Does tools.c need to be a shared object as well?

Thanks a lot!

Hadassa
-- 
Hadassa Brunschwig
PhD Student
Department of Statistics
The Hebrew University of Jerusalem
http://www.stat.huji.ac.il

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to