From francesco.finazzi at unibg.it  Wed Sep 14 09:40:44 2011
From: francesco.finazzi at unibg.it (Francesco Finazzi)
Date: Wed, 14 Sep 2011 09:40:44 +0200
Subject: [Rd] Building R package with precompiled shared library
Message-ID: <CABeDHXCznmmUDVRhcDXc-3NXR4PK4A9r_30YLNcTuC1Kihpo6Q@mail.gmail.com>

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?

Thanks,

Michela and Francesco



[Rd] Building R package with precompiled shared library
Francesco Finazzi