[Rcpp-devel] Re-using C++ code from a package with modules and defining linker flags using Rscript
On 16 May 2011 at 10:28, Jelmer Ypma wrote:
| Thanks for both your replies. I got it working the way I wanted. If | someone's interested, a simple example with two packages can be | downloaded here: http://www.ucl.ac.uk/~uctpjyy/downloads/RcppEx.zip | | QuadFunc defines a C++ class that is used in C++ code in QuadFuncVec. So you define function CxxFlags() and LdFlags() in your package just like we do for Rcpp --- that is indeed just about the only way I could think of. Glad know you got that working. Dirk PS Also try -e "QuadFunc:::CxxFlags()") instead of -e "library(QuadFunc); QuadFunc:::CxxFlags()") as the ::: finds unexported symbols, that usually works from unloaded packages too. And because of LinkingTo: QuadFunc you may not need the CxxFlags.
Gauss once played himself in a zero-sum game and won $50.
-- #11 at http://www.gaussfacts.com