[Rd] [R] C Entry Points
Seth Falcon
sfalcon at fhcrc.org
Tue Aug 8 07:40:32 CEST 2006
"Gregory Wall" <gdwall at ucdavis.edu> writes:
> Hi Everyone:
>
> I'm getting this error when I try to call a C routine from within an R
> package:
>
> Error in .C("testC", as.integer(length(x)), ans = double(1), PACKAGE =
> "mypkg") : C entry point "testC" not in DLL for package "mypkg"
>
> here are some useful outputs: nm mypkg.so | grep testC 000006e4 T
> testC
>
> getLoadedDLLs() Filename Dynamic.Lookup base
>
> base FALSE grDevices
> /usr/local/lib/R/library/grDevices/libs/grDevices.so FALSE stats
> /usr/local/lib/R/library/stats/libs/stats.so FALSE methods
> /usr/local/lib/R/library/methods/libs/methods.so FALSE
>
> getDLLRegisteredRoutines("mypkg")
>
> Error in getDLLRegisteredRoutines.character("mypkg") : No DLL
> currently loaded with name or path mypkg
Perhaps your package is missing a call to library.dynam in .First.Lib
or a call to useDynLib in the NAMESPACE file if you are using one.
You might take a look at the Ruuid package in Bioconductor as it is a
fairly simple example of using both .C and .Call.
+ seth
More information about the R-devel
mailing list