> I am slowly switching to Rcpp (what a wonderful tool!).. The classic Rcpp > works fine.. but when I try to run a code with RccpArmadillo, I get the > following error..
Indeed Rcpp is really awesome. I have some questions : - Can we have access to your example (test2.cpp) ? - Which version of clang do you use ? And finally what is the output of the following code : library(Rcpp) library(RcppArmadillo) cppFunction(code = 'arma::mat armatrans(arma::mat A) { return arma::trans(A); }', depends = "RcppArmadillo") armatrans(matrix(1:6, ncol = 3)) ## [,1] [,2] ## [1,] 1 2 ## [2,] 3 4 ## [3,] 5 6 Now if this code doesn't work you also check if you have a working fortran compiler (e.g http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2), you will have more info at http://cran.r-project.org/doc/manuals/R-admin.html#Mavericks You can finally try to search the R-sig-mac<https://stat.ethz.ch/mailman/listinfo/r-sig-mac>archives too, you will probably find some intersting threads. Hope it helps On Sun, Apr 27, 2014 at 3:47 AM, Modibo Sidibe <sidibe.mod...@gmail.com>wrote: > Hi All, > > I am slowly switching to Rcpp (what a wonderful tool!).. The classic Rcpp > works fine.. but when I try to run a code with RccpArmadillo, I get the > following error.. > > clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG > -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include > -I"/Users/ms486/Library/R/3.1/library/Rcpp/include" > -I"/Users/ms486/Library/R/3.1/library/RcppArmadillo/include" -fPIC > -Wall -mtune=core2 -g -O2 -c test2.cpp -o test2.o clang++ -dynamiclib > -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module > -multiply_defined suppress -L/usr/local/lib -o sourceCpp_40346.so test2.o > -L/Library/Frameworks/R.framework/Resources/lib -lRlapack > -L/Library/Frameworks/R.framework/Resources/lib -lRblas > -L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2 -lgfortran -lquadmath > -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework > -Wl,CoreFoundation > Error in sourceCpp("test2.cpp") : > Error 1 occurred building shared library. > ld: warning: directory not found for option > '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2' > ld: library not found for -lquadmath > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > make: *** [sourceCpp_40346.so] Error 1 > > Here is the outcome of the Rsession > > R version 3.1.0 (2014-04-10) > Platform: x86_64-apple-darwin13.1.0 (64-bit) > > locale: > [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] Rcpp_0.11.1 > > loaded via a namespace (and not attached): > [1] parallel_3.1.0 RcppArmadillo_0.4.200.0 tools_3.1.0 > > Thanks for your help! > _______________________________________________ > Rcpp-devel mailing list > Rcpp-devel@lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel > -- Ahmadou H. DICKO statistician economist (Ingénieur Statisticien Économiste) PhD candidate in Climate change economics Faculty of economics and managment - Cheikh Anta Diop University West African Science Service Center on Climate Change and Adaptated Land Use (WASCAL) Center for Development Research (ZEF) - University of Bonn email : ahmadou.di...@ucad.edu.sn twitter : @dickoah github : github/dickoa <https://github.com/dickoa> tel : +221 33 827 55 16 portable: +221 77 123 81 69
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel