[Rcpp-devel] How to tell sourceCpp where to store the created shared library and linking R-code?

Mitov Venelin vmitov at gmail.com
Thu Apr 24 17:47:33 CEST 2014


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?

Best, 
Venelin


More information about the Rcpp-devel mailing list