On 19 July 2012 at 09:17, Vaclav Petras wrote: | On 18 July 2012 18:33, Dirk Eddelbuettel <[email protected]> wrote: | > | > On 18 July 2012 at 18:21, Vaclav Petras wrote: | > | I used it just as an minimal working example. I'm sorry for confusion. | > | | > | I need it for _truly new libraries_ and same would apply also for my | > | own library if i have some. | > | | > | As I see I didn't include to my previous email explicit sentence | > | stating that I need really custom include path. So here it is. | > | > As I said, you probably want autoconf / configure to automate the search for | > headers and resulting configuration. | > | Yes, if I will do something more (and real) I will need some configure | for sure. But still, if it is possible to set flags for linking (-L | and -Wl,-rpath), for me it makes sense that some straightforward way | how to set include paths (-I) and additional compiler options should | exists. In another words, I would expect that Rcpp.plugin.maker will | have not only 'libs' parameter but also 'include.path' and 'flags' | parameters. | | > What is your use case? | | My use case is calling GRASS library functions from R [1]. I didn't | started yet and so far it is not clear what to do. I'm just exploring | the possibilities now. As a developer I don't have GRASS in standard | path and I want to do some ad-hoc tests and for them Rcpp.plugin.maker | is ideal solution. But I think that this approach can be used by | regular (power) users to write some one-purpose R script (with | Rcpp+inside).
You could copy and extend our plugin code to provide a plugin in your package. Rcpp never needed external -I flags as it brings its own headers, same with RcppArmadillo etc pp. The plugin for RcppGSL may be an example, it does set PKG_CPPFLAGS to find GSL headers. See R/inline.R of the RcppGSL package. Dirk | > Are you sure you don't want to build a package? In | > that case you'd modify src/Makevars and would not need the plugin which is | > just used for smaller-scale use via inline. | > | As you can see, I'm not sure what to do. However, building a package | is highly probable. But I got the impression that some plugin for | inline package have to be the part of a package if I want to enable to | write custom functions which use some library other than standard C++ | lib. | | [1] http://lists.osgeo.org/pipermail/grass-stats/2012-July/001422.html -- 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
