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

2013-08-21 Thread Dirk Eddelbuettel
Hi Jacob, On 21 August 2013 at 19:53, jacob.a.russell...@dartmouth.edu wrote: | Thanks for the help! I ended up reading a little more and found that I | could create a Makefile instead of using Makevars. I took this approach. Do not do that. R creates its own Makefile, and it is MUCH easier to

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

2013-08-21 Thread jacob.a.russell.th
Hey Dirk, Thanks for the help! I ended up reading a little more and found that I could create a Makefile instead of using Makevars. I took this approach. I am including the Makefile in case anyone else has a similar problem to what I had but I don't recommend deviating from the Makevars approach u

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

2013-08-21 Thread Dirk Eddelbuettel
On 20 August 2013 at 15:09, jacob.a.russell...@dartmouth.edu wrote: | Hey Dirk, | | I know that linking to a shared library is not enough, and that I need | to runtime load the actual libraries that have their shared code stored | separately. I wanted to do this in a way that when loaded by someo

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

2013-08-21 Thread Dirk Eddelbuettel
On 20 August 2013 at 11:39, Wush Wu wrote: | 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 mu

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

2013-08-20 Thread jacob.a.russell.th
Hey Dirk, I know that linking to a shared library is not enough, and that I need to runtime load the actual libraries that have their shared code stored separately. I wanted to do this in a way that when loaded by someone who installs the package, the shared libraries that I am including are avail

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] 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] 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

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

2013-08-16 Thread Dirk Eddelbuettel
On 16 August 2013 at 13:45, jacob.a.russell...@dartmouth.edu wrote: | Hello, | | I am trying to build a package but I have quite a few dependencies. As such, I | have modified Makevars to be (I don't like backticks because I find them too | similar to single quotes): | | PKG_LIBS = $($(R_HOME)/b

[Rcpp-devel] Rcpp build trouble with strings

2013-08-16 Thread jacob.a.russell.th
Hello, I am trying to build a package but I have quite a few dependencies. As such, I have modified Makevars to be (I don't like backticks because I find them too similar to single quotes): PKG_LIBS = $($(R_HOME)/bin/Rscript -e 'Rcpp:::LdFlags()') -L. -llink_4_1b -lDGG -lSTR -lDLL -lAF -lmy_std