[Rcpp-devel] Can't compile BOOST package via Rcpp on Windows7 OS

Dirk Eddelbuettel edd at debian.org
Tue Nov 11 16:46:44 CET 2014


David,

And for good measure, I just dropped the very first Rcpp Gallery example into
RStudio on my work machine (which, while being Windows, mostly serves for
receiving x11 terminals from Linux). It passed without any issues:

R> Rcpp::sourceCpp('C:/TEMP/boostEx.cpp', verbose=TRUE, rebuild=TRUE)

Generated extern "C" functions 
--------------------------------------------------------


#include <Rcpp.h>

RcppExport SEXP sourceCpp_32214_computeGCD(SEXP aSEXP, SEXP bSEXP) {
BEGIN_RCPP
    SEXP __sexp_result;
    {
        Rcpp::RNGScope __rngScope;
        Rcpp::traits::input_parameter< int >::type a(aSEXP );
        Rcpp::traits::input_parameter< int >::type b(bSEXP );
        int __result = computeGCD(a, b);
        PROTECT(__sexp_result = Rcpp::wrap(__result));
    }
    UNPROTECT(1);
    return __sexp_result;
END_RCPP
}

RcppExport SEXP sourceCpp_32214_computeLCM(SEXP aSEXP, SEXP bSEXP) {
BEGIN_RCPP
    SEXP __sexp_result;
    {
        Rcpp::RNGScope __rngScope;
        Rcpp::traits::input_parameter< int >::type a(aSEXP );
        Rcpp::traits::input_parameter< int >::type b(bSEXP );
        int __result = computeLCM(a, b);
        PROTECT(__sexp_result = Rcpp::wrap(__result));
    }
    UNPROTECT(1);
    return __sexp_result;
END_RCPP
}

Generated R functions 
-------------------------------------------------------

`.sourceCpp_32214_DLLInfo` <-
dyn.load('C:/Users/DEDDEL~1/AppData/Local/Temp/Rtmpa00Mwv/sourcecpp_21f846bbab5/sourceCpp_2293.dll')

computeGCD <- Rcpp:::sourceCppFunction(function(a, b) {}, FALSE,
`.sourceCpp_32214_DLLInfo`, 'sourceCpp_32214_computeGCD')
computeLCM <- Rcpp:::sourceCppFunction(function(a, b) {}, FALSE,
`.sourceCpp_32214_DLLInfo`, 'sourceCpp_32214_computeLCM')

rm(`.sourceCpp_32214_DLLInfo`)

Building shared library
--------------------------------------------------------

DIR: C:/Users/DEDDEL~1/AppData/Local/Temp/Rtmpa00Mwv/sourcecpp_21f846bbab5

C:/opt/R-CURR~1/bin/x64/R CMD SHLIB -o "sourceCpp_2293.dll" --preclean
"boostEx.cpp" 
g++ -m64 -I"C:/opt/R-CURR~1/include" -DNDEBUG
-I"c:/opt/R-library/Rcpp/include" -I"c:/opt/R-library/BH/include"
-I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall  -mtune=core2
-c boostEx.cpp -o boostEx.o
g++ -m64 -shared -s -static-libgcc -o sourceCpp_2293.dll tmp.def boostEx.o
-Ld:/RCompile/CRANpkg/extralibs64/local/lib/x64
-Ld:/RCompile/CRANpkg/extralibs64/local/lib -LC:/opt/R-CURR~1/bin/x64 -lR
R> 


Hth, Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org


More information about the Rcpp-devel mailing list