Someone recently asked (and I can't find it here so it may have been on
StackOverflow) how to tell inline to also consider the current working
directory for includes.

I answered that one can't as inline / cxxfunction always switches to a
temporary directory created by R.  Turns out that one can in fact, as it is
the known current working directory.  Romain had added this in one of our
examples:

        settings <- getPlugin("Rcpp")
        settings$env$PKG_CXXFLAGS <- paste("-I", getwd(), sep="")

and then uses   settings=settings   in the call to cxxfunction.  

Nice trick.

Regards,  Dirk

-- 
R/Finance 2012 Conference on May 11 and 12, 2012 at UIC in Chicago, IL
See agenda, registration details and more at http://www.RinFinance.com
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to