Re: [Rcpp-devel] sourceCpp and #include .hpp ?

2013-08-19 Thread Colin Rundel
I've run into the same issue and have been using the Rcpp's plugin framework to work around it. My R file defines a local_include plugin as follows: registerPlugin("local_include", function() { list(env = list(PKG_CXXFLAGS=paste0("-I",path.expand("~/Desktop/

Re: [Rcpp-devel] Rcpp build trouble with strings

2013-08-19 Thread Wush Wu
Thanks for you correction, Dirk. It seems that if I don't care about portability, I could add the absolutely path of the .so files into OBJECTS in Makevars. For example: ``` ## Use the R_HOME indirection to support installations of multiple R version PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::

Re: [Rcpp-devel] sourceCpp and #include .hpp ?

2013-08-19 Thread Tal Galili
Thank you Kevin and Dirk, I was hoping for for an easier fix (such as, having sourceCpp give a parameter controlling where it was building the thing). Thank you both for the explanations. Best, Tal Contact Details:--- Contact

Re: [Rcpp-devel] Rcpp build trouble with strings

2013-08-19 Thread Dirk Eddelbuettel
On 20 August 2013 at 08:34, Wush Wu wrote: | Maybe you need to set some flag in NAMESPACES to ask the package to load | required libraries. No, not at all. The system linker still needs to find it. Example from my system: edd@max:~$ ldd /usr/local/lib/R/site-library/RcppGSL/libs/RcppGSL.so

Re: [Rcpp-devel] Rcpp build trouble with strings

2013-08-19 Thread Wush Wu
Maybe you need to set some flag in NAMESPACES to ask the package to load required libraries. Hope that help. Hey again, I built the default Rcpp.package.skeleton rcpp_hello_world to take in strings and it worked fine. My problems seem to be from the libraries themselves. I recompiled the librarie

Re: [Rcpp-devel] Rcpp build trouble with strings

2013-08-19 Thread Dirk Eddelbuettel
Hi Jacob, On 19 August 2013 at 13:10, jacob.a.russell...@dartmouth.edu wrote: | Hey again, | | I built the default Rcpp.package.skeleton rcpp_hello_world to take in | strings and it worked fine. My problems seem to be from the libraries | themselves. I recompiled the libraries that I could to be

Re: [Rcpp-devel] sourceCpp and #include .hpp ?

2013-08-19 Thread Dirk Eddelbuettel
On 19 August 2013 at 11:51, Kevin Ushey wrote: | If you run sourceCpp(..., verbose=TRUE), you'll see that the source code is | copied into a temporary directory, and then the working directory is reset to | that directory. So the header file is no longer discovered there. (not to Correct. [ A co

Re: [Rcpp-devel] sourceCpp and #include .hpp ?

2013-08-19 Thread Kevin Ushey
Hi Tal, If you run sourceCpp(..., verbose=TRUE), you'll see that the source code is copied into a temporary directory, and then the working directory is reset to that directory. So the header file is no longer discovered there. (not to mention, you would have to tell sourceCpp where to find those

[Rcpp-devel] sourceCpp and #include .hpp ?

2013-08-19 Thread Tal Galili
Hello dear list members, I'm working the an a package with Rcpp code, and would like to have a cpp function in one file, and then be able to access it from another. It appears that using: #include "file_name.hpp" Works great while compiling. However, when debugging the file, I discovered the when

Re: [Rcpp-devel] Rcpp build trouble with strings

2013-08-19 Thread jacob.a.russell.th
Hey again, I built the default Rcpp.package.skeleton rcpp_hello_world to take in strings and it worked fine. My problems seem to be from the libraries themselves. I recompiled the libraries that I could to be shared libraries and now the package builds the .so file, but I still get an error when c