0
votes

I have written functions using RcppArmadillo and inline packages, I am using windows 7, R-2.14.1 and Rtools215 are installed and the path is checked.

funs = cxxfunction(list(MHcpp = signature(…), IWcpp = signature(…),  c(code1,code2), 
plugin="RcppArmadillo" ) # No compline and I they work fine as expected.

Package.skeleton(“new”,funs) # to create the package skeleton and the dynamic libray
# to build the package  I use
R CMD INSTALL –build new # I get the following error
C:/Users/samuel/Documents/R/win-library/2.14/Rcpp/lib/i386/libRcpp.a(Dimension.o
):Dimension.cpp:(.text+0x342): undefined reference to `_Unwind_SjLj_Unregister'
…………………………………………………………..
…………………………………………………………….
C:/Users/samuel/Documents/R/win-library/2.14/Rcpp/lib/i386/libRcpp.a(Environment
.o):Environment.cpp:(.text$_ZN4Rcpp11no_such_envC1Ei[Rcpp::no_such_env::no_such_
env(int)]+0x3fc): undefined reference to `_Unwind_SjLj_Unregister'
C:/Users/samuel/Documents/R/win-library/2.14/Rcpp/lib/i386/libRcpp.a(Environment
.o):Environment.cpp:(.text$_ZN4Rcpp11no_such_envC1Ei[Rcpp::no_such_env::no_such_
env(int)]+0x644): undefined reference to `_Unwind_SjLj_Resume'
collect2: ld returned 1 exit status
ERROR: compilation failed for package 'new'
* removing 'C:/Users/samuel/Documents/R/win-library/2.14/new'

Any advice on how to fix the problem.

1

1 Answers

2
votes

You need to use the package.skeleton variant provided by Rcpp, or in this case, RcppArmadillo. That is, call

 RcppArmadillo.package.skeleton(...)

not the one from base R.

You can also look at how the other CRAN packages that depend on RcppArmadillo are organised and compare the differences.