On 4 September 2013 at 18:21, guxiaobo1982 wrote:
| Hi Dirk,
|
| Thanks for you help, here is wha I got in a test package:
|
| 1.Rcpp.package.skeleton("cpptest")
Good start!
| 2. Add the following line to Makevars
|
| PKG_CPPFLAGS=-I/opt/boost_1_54_0/include -I../inst/include PKG_LIBS = -L/opt/
| boost_1_54_0/lib -lboost_regex `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"`
Those have to be __two distinct lines__ not one glued together. Try
PKG_CPPFLAGS=-I/opt/boost_1_54_0/include -I../inst/include
PKG_LIBS = -L/opt/boost_1_54_0/lib -lboost_regex `$(R_HOME)/bin/Rscript -e
"Rcpp:::LdFlags()"`
ie one assignment each to two variables PKG_CPPFLAGS and PKG_LIBS.
| 3. Change rcpp_hello_world.cpp to this:
Looks good, and should work. Boost Regex use is a nice small example.
Dirk
--
Dirk Eddelbuettel | [email protected] | http://dirk.eddelbuettel.com
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel