Skip to content
Back to formatted view

Raw Message

Message-ID: <db80b30d0901110529h5b920b8cjffc19866730fd873@mail.gmail.com>
Date: 2009-01-11T13:29:56Z
From: Hadassa Brunschwig
Subject: Makevars

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