Taigo, On 27 January 2014 at 17:58, Tiago Fragoso wrote: | I'm trying to use Rcpp with bigmemory, and I'm using the exact same example | from http://gallery.rcpp.org/articles/using-bigmemory-with-rcpp/ , but I'm | encountering the following error: | | > sourceCpp("example.cpp") | In file included from /home/tiago/R/x86_64-pc-linux-gnu-library/3.0/bigmemory/ | include/bigmemory/MatrixAccessor.hpp:4:0, | from example.cpp:7: | /home/tiago/R/x86_64-pc-linux-gnu-library/3.0/bigmemory/include/bigmemory/ | BigMatrix.h:5:48: fatal error: boost/interprocess/mapped_region.hpp: No such | file or directory | compilation terminated. | make: *** [example.o] Error 1 | g++ -I/usr/share/R/include -DNDEBUG -I"/home/tiago/R/ | x86_64-pc-linux-gnu-library/3.0/Rcpp/include" -I"/home/tiago/R/ | x86_64-pc-linux-gnu-library/3.0/bigmemory/include" -fpic -O2 -pipe -g | -c teste.cpp -o teste.o | Error in sourceCpp("example.cpp") : | Error 1 occurred building shared library. | | Any ideas?
Yes, as fatal error: boost/interprocess/mapped_region.hpp: No such file or directory is pretty explicit. You don't seem to have a full set of boost headers. When I do 'locate mapped_region.hpp' on my system I get a few hits from boost itself, from our BH package (as well as from the dev, sources of BH). So filtered: edd@max:~$ locate mapped_region.hpp | grep "/usr" /usr/include/boost/interprocess/mapped_region.hpp /usr/local/lib/R/site-library/BH/include/boost/interprocess/mapped_region.hpp edd@max:~$ Do you have Boost and/or the latest version of our BH package? If you have the latter, try adding // [[Rcpp::depends(BH)]] to your file example.cpp Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel