[Rcpp-devel] PKG_CPPFLAGS and PKG_LIBS not being picked for compilation

Chaomei Lo chaomeilo at gmail.com
Wed Apr 23 23:57:20 CEST 2014


Hi, Dirk,



I am testing the TRNG (Random number generation) using Rcpp, but it seems
like the PKG_CPPFLAGS and PKG_LIBS not being picked for compilation and
creating shared library.  I invoked the R shell right above the “trng”.



> getwd()

[1] "/people/mei/trng-4.15"

> library(Rcpp)

> Sys.setenv(“PKG_CPPFLAGS”=”-I.”)

> Sys.setenv(“PKG_CXXFLAGS”=”-fopenmp”)

> Sys.setenv(“PKG_LIBS”=”-L/people/mei/trng-4.15/conf_prefix/lib -ltrng4″)

> sourceCpp(“prunif.cpp”)

prunif.cpp:4:26: fatal error: trng/yarn2.hpp: No such file or directory

compilation terminated.

make: *** [prunif.o] Error 1

g++ -I/people/mei/softwarelib/R-3.0.2/include -DNDEBUG -I.
-I/usr/local/include
-I”/people/mei/softwarelib/R-3.0.2/library/Rcpp/include” -fopenmp -fpic -g
-O2 -c prunif.cpp -o prunif.o

Error in sourceCpp(“prunif.cpp”) :

Error 1 occurred building shared library.



Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140423/13154c1a/attachment.html>


More information about the Rcpp-devel mailing list