[Rcpp-devel] Rcpp and boost on Windows 7
Romain Francois
romain at r-enthusiasts.com
Sun Feb 3 12:18:19 CET 2013
Le 03/02/13 12:09, André de Boer a écrit :
> Hello,
> 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.
>
>
>
> Regards,
>
> André
Hello,
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.
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
blog: http://romainfrancois.blog.free.fr
|- http://bit.ly/RE6sYH : OOP with Rcpp modules
`- http://bit.ly/Thw7IK : Rcpp modules more flexible
More information about the Rcpp-devel
mailing list