Skip to content
Back to formatted view

Raw Message

Message-ID: <372361E2.3BA7A9F8@enteract.com>
Date: 1999-04-25T18:41:38Z
From: Barnet Wagman
Subject: Neophyte question re using dyn.load and accessing c functions

I'm have what's probably a trivial &| silly problem trying to access a
c-function in a shared
library ( R 0.64, under redhat linux 5.2).

    R COMPILE rctest.c
    R SHLIB -o libRC.so rctest.o

produce a reasonable looking shared library ('nm libRC.so' shows that
the function 'rctest' is present).

In R, the command

    dyn.load("/fullpathname/libRC.so")

returns without an error.  However, I'm unable to access the function.
E.g.

    is.loaded(symbol.C("rctest"))

yields FALSE.

    .C("rctest",x)

yields "Error in .C("rctest", x) : C/Fortran function not in load table"

There must be something I'm leaving out, but after searching the
documentation and
help archive, I'm stuck.  Does the .so have to be in an R package (if
so, where)?

Thanks,

-------------------
Barnet Wagman

wagman at enteract.com
773-645-8369

1361 N. Hoyne
Chicago, IL 60622
--------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/19990425/efb04208/attachment.html