[Rcpp-devel] PKG_CXXFLAGS of Makevar

Seungki Kim devcat3 at gmail.com
Thu May 3 16:52:58 CEST 2012


Hi,

I am using a Makevar file for Rcpp package. It's from [
Rcpp.package.skeleton( ) ] command.

I added something for GSL.

GSL_CFLAGS = `gsl-config --cflags`
GSL_LIBS   = `gsl-config --libs`

PKG_CXXFLAGS= `${R_HOME}/bin/Rscript -e "Rcpp:::CxxFlags()"` $(GSL_CFLAGS)
PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` $(GSL_LIBS)



Then, PKG_LIBS is working well. But PKG_CXXFLAGS is not working well.



g++ -I/usr/share/R/include -DNDEBUG
-I"/usr/local/lib/R/site-library/Rcpp/include" * `/usr/lib64/R/bin/Rscript
-e "Rcpp:::CxxFlags()"` `gsl-config --cflags` *-fpic  -O3 -pipe  -g  -c
rcpp_hello_world.cpp -o rcpp_hello_world.o

g++ -shared -o RcppTest.so rcpp_hello_world.o
*-L/usr/local/lib/R/site-library/Rcpp/lib
-lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib* *-L/usr/lib -lgsl
-lgslcblas -lm *-L/usr/lib64/R/lib -lR


Why are these different? Am I using wrong?

Thank you,
Seung
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20120503/f69778c2/attachment.html>


More information about the Rcpp-devel mailing list