[Rd] Building R package with precompiled shared library

Francesco Finazzi francesco.finazzi at unibg.it
Wed Sep 14 09:40:44 CEST 2011

Dear R users,

we are trying to build a R package that includes a precompiled shared
library, let's say mylib.so. We created the skeleton of the package
and we moved the mylib.so file into the libs folder that we created at
the same level of the folders man and R. Moreover we created the file
NAMESPACE and we added the line useDynLib(mylib, .registration=TRUE).
The building step seems to work correctly but when we try to install
the package we get

** testing if installed package can be loaded
Error in library.dynam(lib, package, package.lib) :
 shared library 'mylib' not found

we cannot understand what's wrong and where R searches for the mylib.so files.

Any suggestion?


Michela and Francesco

More information about the R-devel mailing list