[Rcpp-devel] Regular Expressions

Dirk Eddelbuettel edd at debian.org
Sat Mar 2 16:17:14 CET 2013


On 1 March 2013 at 23:03, Gabor Grothendieck wrote:
| On Fri, Mar 1, 2013 at 9:50 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
| >
| > On 1 March 2013 at 21:24, Hadley Wickham wrote:
| > | > | I searched BH for regex and found nothing so I don't think BH includes
| > | > | Boost.Regex.
| > | >
| > | > Could you register an issue ticket at the r-forge page for BH, please?  There
| > | > are other things missing too, of course, as we started pretty with the needs
| > | > of "just" bigmemory and RcppBDT.
| > |
| > | But Boost.Regex isn't header only?
| >
| > Yup. Found that out the hard way when I wrote it up as a piece for the Rcpp
| > Gallery. You do need to link.
| >
| > Piece now up at http://gallery.rcpp.org/articles/boost-regular-expressions/
| >
| 
| I have downloaded boost such that I have this file:
| 
| C:\MinGW\lib\libboost_regex.a
| 
| How do I tell Rcpp to use it?

Follow eg the Rcpp Gallery story and use

    Sys.setenv("PKG_LIBS"="C:\MinGW\lib\libboost_regex.a")

as static library can be given "as is".  Else try 

    Sys.setenv("PKG_LIBS"="-LC:\MinGW\lib\ -lboost_regex")

which is the standard form.  That should work with the example I posted.

If everthing else, try the documentation for Rcpp (Rcpp-package vignette in
particular) or Boost.

Dirk
| 
| 
| --
| Statistics & Software Consulting
| GKX Group, GKX Associates Inc.
| tel: 1-877-GKX-GROUP
| email: ggrothendieck at gmail.com

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com  


More information about the Rcpp-devel mailing list