[Rcpp-devel] How to tell sourceCpp where to store the created shared library and linking R-code?
Dirk Eddelbuettel
edd at debian.org
Thu Apr 24 17:52:48 CEST 2014
On 24 April 2014 at 17:47, Mitov Venelin wrote:
| Hello,
|
| I’m using sourceCpp to build a shared library from a C++ file on a linux server. This shared library has to be linked by many R-processes, so it would be a serious waste if one would rebuild/relink the library from source in each of these processes. On a Windows machine I can find the library in a temporary directory, copy it together with its corresponding R-linking file in the R-project directory and change the directory-path in the R-linking file to the project-directory. On the linux server I’m using, however, the temporary directory seems to be deleted after the build has finished.
| It would be nice, if one could specify an output directory during the call to sourceCpp, but I didn’t find an argument about that in the sourceCpp documentation. Is there a way to do it?
When you say "has to be linked by many R proceses" you probably mean "needs
to be loaded by many R processes"
R offers the package system for this, and Rcpp has always encouraged you to
created packages. This is no different and not a job for sourceCpp().
Dirk
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list