<font face="georgia, serif">Hi,<br><br>I am using a Makevar file for Rcpp package. It's from [ Rcpp.package.skeleton( ) ] command.<br><br>I added something for GSL.</font><br><br><font face="'courier new', monospace">GSL_CFLAGS = `gsl-config --cflags`<br>
GSL_LIBS = `gsl-config --libs`<br><br>PKG_CXXFLAGS= `${R_HOME}/bin/Rscript -e "Rcpp:::CxxFlags()"` $(GSL_CFLAGS)<br>PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` $(GSL_LIBS)<br></font><br>
<br><font face="georgia, serif"><br>Then, PKG_LIBS is working well. But PKG_CXXFLAGS is not working well.<br><br></font><font face="'courier new', monospace"><br><br>g++ -I/usr/share/R/include -DNDEBUG -I"/usr/local/lib/R/site-library/Rcpp/include" <b> `/usr/lib64/R/bin/Rscript -e "Rcpp:::CxxFlags()"` `gsl-config --cflags` </b>-fpic -O3 -pipe -g -c rcpp_hello_world.cpp -o rcpp_hello_world.o<br>
<br>g++ -shared -o RcppTest.so rcpp_hello_world.o <b>-L/usr/local/lib/R/site-library/Rcpp/lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib</b> <b>-L/usr/lib -lgsl -lgslcblas -lm </b>-L/usr/lib64/R/lib -lR<br></font><div>
<br></div><div><br></div><div><font face="georgia, serif">Why are these different? Am I using wrong?</font></div><div><font face="georgia, serif"><br></font></div><div><font face="georgia, serif">Thank you,</font></div><div>
<font face="georgia, serif">Seung</font></div><div><font face="georgia, serif"><br></font></div>