[Rcpp-devel] Rcpp and boost on Windows 7

Jay Emerson jayemerson at gmail.com
Sun Feb 3 15:23:30 CET 2013


Maybe we (I) should accept requests for additions to BH, rebuild, and
make available on R-Forge.  When there is proof that the addition has
been used successfully, bump up to CRAN.  We don't want excessive
uploads to CRAN because of the size, of course.

Sounds like foreach may be next?

Jay

On Sun, Feb 3, 2013 at 8:49 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> On 3 February 2013 at 12:18, Romain Francois wrote:
> | Le 03/02/13 12:09, André de Boer a écrit :
> | > I want to use Rcpp with boost, the boost headers are installed in
> | > 'C:\libraries\boost_1_49_0'. How to set the -I flag?
> | >
> | >>sourceCpp("testBoost.cpp")
> | >
> | > g++ -m64 -I"C:/R/R-215~1.2/include" -DNDEBUG     -I"C:/R/R-2.15.2/library/Rcpp/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall  -mtune=core2 -c testBoost.cpp -o testBoost.o testBoost.cpp:2:29: fatal error: boost\foreach.hpp: No such file or directory compilation terminated. make: *** [testBoost.o] Error 1
> | > Error in sourceCpp("testBoost.cpp") :
> | >    Error 1 occurred building shared library.
> |
> | You should have a look at the BH package, with which all you have to do
> | (I think) is to have this in your DESCRIPTION:
> |
> | LinkingTo: BH, Rcpp
> |
> | And you're good to go.
>
> Yes, but only if the parts of Boost Andre wants are in fact included in
> BH. It is not a "full copy" -- it is a bcp-driven build of what a few
> packages need.  I already found a small and useful piece (Boost foreach)
> missing.  But longer term the plan clearly is to have BH provide what is
> useful, and used.  Feedback is welcome.
>
> More generally, what Andre wants to know is described in full detail in the
> Rcpp vignette 'Rcpp-package.pdf' which details how to write a package using
> Rcpp.  The short version is:  edit src/Makevars and src/Makevars.win.
>
> You can find a examples on using Boost at the Rcpp Gallery under its tag:
>
>     http://gallery.rcpp.org/tags/boost/
>
> Dirk
>
> --
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
> _______________________________________________
> 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



-- 
John W. Emerson (Jay)
Associate Professor of Statistics, Adjunct, and Director of Graduate Studies
Department of Statistics
Yale University
http://www.stat.yale.edu/~jay


More information about the Rcpp-devel mailing list