我已经使用 RcppArmadillo 和内联包编写了函数,我使用的是 Windows 7,安装了 R-2.14.1 和 Rtools215 并检查了路径。
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'
关于如何解决问题的任何建议。