[Rcpp-devel] ??lxh???

Christian Gunning xian at unm.edu
Tue Mar 10 23:44:18 CET 2015


lxh,

A quick word r.e. list etiquette -- you can help others process your
request by including in your email a short & informative title, and a
one or two sentence description of what you're trying to accomplish.

I'm not on windows, so all I can say is that it works for me. Have you
verified that RcppArmadillo installed without error?

The other thing you can try is use the following to observe the
details of the compilation process:

sourceCpp('armaPRI.cpp', verbose=TRUE)

hth,
Christian

> Date: Tue, 10 Mar 2015 21:49:18 +0800 (CST)
> From: lxh <zjgslxh at 163.com>
> To: rcpp-devel at lists.r-forge.r-project.org
> Subject: [Rcpp-devel] ??lxh???
> Message-ID: <1aef304a.18ae8.14c03f25f44.Coremail.zjgslxh at 163.com>
> Content-Type: text/plain; charset="gbk"
>
> Hi,
>
> #########################################
>> Rcpp::sourceCpp('armaPRI.cpp')
>
> Error in inDL(x, as.logical(local), as.logical(now), ...) :
> unable to load shared object 'C:/Users/lxh/AppData/Local/Temp/RtmpeenRl8/sourcecpp_27081dce2d4b/sourceCpp_77404.dll':
> LoadLibrary failure: The specified module could not be found.
> I get this when trying to use RcppArmadillo with my princomp computation program(armaPRI.cpp). I am sure that i have missed something which results above error message, but i have no idea about that.
> By the way, the program eigentrans.cpp which uses the RcppEigen package works well.
>
> The Rtools path and the R bin path are already added to my Enviroment Path:
> #############################################################
> c:\Rtools\gcc-4.6.3\bin;c:\Rtools\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\MiKTeX 2.9\miktex\bin\;C:\Python27;C:\Python27\DLLs;C:\Python27\Scripts;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\TDM-GCC-32\bin;C:\R-3.1.3\bin;D:\Program Files\RStudio\bin\pandoc
> ###########################################################################################
> armaPRI.cpp
> ###########################################################################################
> // [[Rcpp::depends(RcppArmadillo)]]
> #include <RcppArmadillo.h>
> using namespace arma;
> using namespace Rcpp;
> // [[Rcpp::export]]
> int PRINCOMP(){
> mat A = randu<mat>(5,4);
> mat coeff;
> mat score;
> vec latent;
> vec tsquared;
> princomp(coeff, score, latent, tsquared, A);
> Rcout<<coeff<<endl;
> return 0;
> }
> #####################################################################################################

-- 
A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama!


More information about the Rcpp-devel mailing list