If I have <pkg>/inst/include/pkg.h that contains #include<foo/bar.h> where "foo/bar.h" is in <pkg>/inst/include/foo/bar.h The header "bar.h" is not found. What is the standard way to do this? Put "bar.h" into <pkg>/src? It seems odd to alter Makevars adding a path to "<pkg>/inst/include/foo" as I would think that is automatic. (Sorry is this is not an Rcpp question -- I am using Rcpp in the package.) THK -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20150612/b2f23caf/attachment.html>
[Rcpp-devel] Question about include paths
4 messages · Tim Keitt, Hao Ye, Kevin Ushey
Hi Tim, My Rcpp package compiles fine with header files in /inst/include (and subfolders), but I do have the following line in my Makevars:
PKG_CXXFLAGS = -pedantic -Wall -I../inst/include
You may need the last option there to add /inst/include to the search path. Best, -- Hao Ye hye at ucsd.edu
On Jun 12, 2015, at 9:19 AM, Tim Keitt <tkeitt at utexas.edu> wrote: If I have <pkg>/inst/include/pkg.h that contains #include<foo/bar.h> where "foo/bar.h" is in <pkg>/inst/include/foo/bar.h The header "bar.h" is not found. What is the standard way to do this? Put "bar.h" into <pkg>/src? It seems odd to alter Makevars adding a path to "<pkg>/inst/include/foo" as I would think that is automatic. (Sorry is this is not an Rcpp question -- I am using Rcpp in the package.) THK
_______________________________________________ Rcpp-devel mailing list Rcpp-devel at lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
http://www.keittlab.org/
On Fri, Jun 12, 2015 at 11:33 AM, Hao Ye <hye at ucsd.edu> wrote:
Hi Tim, My Rcpp package compiles fine with header files in /inst/include (and subfolders), but I do have the following line in my Makevars:
PKG_CXXFLAGS = -pedantic -Wall -I../inst/include
You may need the last option there to add /inst/include to the search path.
Thanks. I'll try it. I would have guessed that was a default. THK
Best, -- Hao Ye hye at ucsd.edu
On Jun 12, 2015, at 9:19 AM, Tim Keitt <tkeitt at utexas.edu> wrote: If I have <pkg>/inst/include/pkg.h that contains #include<foo/bar.h> where "foo/bar.h" is in <pkg>/inst/include/foo/bar.h The header "bar.h" is not found. What is the standard way to do this?
Put "bar.h" into <pkg>/src? It seems odd to alter Makevars adding a path to "<pkg>/inst/include/foo" as I would think that is automatic.
(Sorry is this is not an Rcpp question -- I am using Rcpp in the
package.)
THK
_______________________________________________ Rcpp-devel mailing list Rcpp-devel at lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
_______________________________________________ Rcpp-devel mailing list Rcpp-devel at lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20150612/f79537b9/attachment.html>
Indeed. I think this has been requested before to R-Core (adding 'inst/include' by default), but at the time they weren't willing to make such a change. There's a chance they would still be receptive given a suitable patch, though.
On Fri, Jun 12, 2015 at 10:24 AM Tim Keitt <tkeitt at utexas.edu> wrote:
http://www.keittlab.org/ On Fri, Jun 12, 2015 at 11:33 AM, Hao Ye <hye at ucsd.edu> wrote:
Hi Tim, My Rcpp package compiles fine with header files in /inst/include (and subfolders), but I do have the following line in my Makevars:
PKG_CXXFLAGS = -pedantic -Wall -I../inst/include
You may need the last option there to add /inst/include to the search path.
Thanks. I'll try it. I would have guessed that was a default. THK
Best, -- Hao Ye hye at ucsd.edu
On Jun 12, 2015, at 9:19 AM, Tim Keitt <tkeitt at utexas.edu> wrote: If I have <pkg>/inst/include/pkg.h that contains #include<foo/bar.h> where "foo/bar.h" is in <pkg>/inst/include/foo/bar.h The header "bar.h" is not found. What is the standard way to do this?
Put "bar.h" into <pkg>/src? It seems odd to alter Makevars adding a path to "<pkg>/inst/include/foo" as I would think that is automatic.
(Sorry is this is not an Rcpp question -- I am using Rcpp in the
package.)
THK
_______________________________________________ Rcpp-devel mailing list Rcpp-devel at lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
_______________________________________________ Rcpp-devel mailing list Rcpp-devel at lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
_______________________________________________ Rcpp-devel mailing list Rcpp-devel at lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20150612/2745cac7/attachment.html>