R Under development (unstable) (2025-07-18 r88431 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > Sys.setenv("R_TESTS" = "") > library(testthat) > library(RcppXPtrUtils) > test_check("RcppXPtrUtils") Generated code for function definition: -------------------------------------------------------- #include using namespace Rcpp; // [[Rcpp::export]] NumericVector execute_cpp(SEXP func_, int n, double l) { typedef SEXP (*funcPtr)(int, double); funcPtr func = *XPtr(func_); return func(n, l); } Generated extern "C" functions -------------------------------------------------------- #include #ifdef RCPP_USE_GLOBAL_ROSTREAM Rcpp::Rostream& Rcpp::Rcout = Rcpp::Rcpp_cout_get(); Rcpp::Rostream& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get(); #endif // execute_cpp NumericVector execute_cpp(SEXP func_, int n, double l); RcppExport SEXP sourceCpp_1_execute_cpp(SEXP func_SEXP, SEXP nSEXP, SEXP lSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGScope rcpp_rngScope_gen; Rcpp::traits::input_parameter< SEXP >::type func_(func_SEXP); Rcpp::traits::input_parameter< int >::type n(nSEXP); Rcpp::traits::input_parameter< double >::type l(lSEXP); rcpp_result_gen = Rcpp::wrap(execute_cpp(func_, n, l)); return rcpp_result_gen; END_RCPP } Generated R functions ------------------------------------------------------- `.sourceCpp_1_DLLInfo` <- dyn.load('D:/temp/2025_07_21_18_20_16_5310/RtmpoTdIsE/sourceCpp-x86_64-w64-mingw32-1.1.0/sourcecpp_2bd105f4d34a2/sourceCpp_2.dll') execute_cpp <- Rcpp:::sourceCppFunction(function(func_, n, l) {}, FALSE, `.sourceCpp_1_DLLInfo`, 'sourceCpp_1_execute_cpp') rm(`.sourceCpp_1_DLLInfo`) Building shared library -------------------------------------------------------- DIR: D:/temp/2025_07_21_18_20_16_5310/RtmpoTdIsE/sourceCpp-x86_64-w64-mingw32-1.1.0/sourcecpp_2bd105f4d34a2 D:/RCompile/recent/R/bin/x64/R CMD SHLIB -o "sourceCpp_2.dll" "file2bd10408c9d3.cpp" using C++ compiler: 'g++.exe (GCC) 14.2.0' make[1]: Entering directory '/d/temp/2025_07_21_18_20_16_5310/RtmpoTdIsE/sourceCpp-x86_64-w64-mingw32-1.1.0/sourcecpp_2bd105f4d34a2' g++ -std=gnu++17 -I"D:/RCompile/recent/R/include" -DNDEBUG -I"D:/RCompile/CRANpkg/lib/4.6/Rcpp/include" -I"D:/temp/2025_07_21_18_20_16_5310/RtmpoTdIsE/sourceCpp-x86_64-w64-mingw32-1.1.0" -I"d:/rtools45/x86_64-w64-mingw32.static.posix/include" -pedantic -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c file2bd10408c9d3.cpp -o file2bd10408c9d3.o g++ -std=gnu++17 -shared -s -static-libgcc -o sourceCpp_2.dll tmp.def file2bd10408c9d3.o -Ld:/rtools45/x86_64-w64-mingw32.static.posix/lib/x64 -Ld:/rtools45/x86_64-w64-mingw32.static.posix/lib -LD:/RCompile/recent/R/bin/x64 -lR make[1]: Leaving directory '/d/temp/2025_07_21_18_20_16_5310/RtmpoTdIsE/sourceCpp-x86_64-w64-mingw32-1.1.0/sourcecpp_2bd105f4d34a2' make[1]: Entering directory '/d/temp/2025_07_21_18_20_16_5310/RtmpoTdIsE/sourceCpp-x86_64-w64-mingw32-1.1.0/sourcecpp_2bd105f4d34a2' make[1]: Leaving directory '/d/temp/2025_07_21_18_20_16_5310/RtmpoTdIsE/sourceCpp-x86_64-w64-mingw32-1.1.0/sourcecpp_2bd105f4d34a2' Generated code for function definition: -------------------------------------------------------- #include using namespace Rcpp; // [[Rcpp::export]] SEXP getXPtr(); SEXP foo(int n, double l) { return NumericVector(n, l); } SEXP getXPtr() { typedef SEXP (*funcPtr)( int n, double l ); return XPtr(new funcPtr(& foo )); } Generated extern "C" functions -------------------------------------------------------- #include #ifdef RCPP_USE_GLOBAL_ROSTREAM Rcpp::Rostream& Rcpp::Rcout = Rcpp::Rcpp_cout_get(); Rcpp::Rostream& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get(); #endif // getXPtr SEXP getXPtr(); RcppExport SEXP sourceCpp_3_getXPtr() { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGScope rcpp_rngScope_gen; rcpp_result_gen = Rcpp::wrap(getXPtr()); return rcpp_result_gen; END_RCPP } Generated R functions ------------------------------------------------------- `.sourceCpp_3_DLLInfo` <- dyn.load('D:/temp/2025_07_21_18_20_16_5310/RtmpoTdIsE/sourceCpp-x86_64-w64-mingw32-1.1.0/sourcecpp_2bd105f3f521a/sourceCpp_4.dll') getXPtr <- Rcpp:::sourceCppFunction(function() {}, FALSE, `.sourceCpp_3_DLLInfo`, 'sourceCpp_3_getXPtr') rm(`.sourceCpp_3_DLLInfo`) Building shared library -------------------------------------------------------- DIR: D:/temp/2025_07_21_18_20_16_5310/RtmpoTdIsE/sourceCpp-x86_64-w64-mingw32-1.1.0/sourcecpp_2bd105f3f521a D:/RCompile/recent/R/bin/x64/R CMD SHLIB -o "sourceCpp_4.dll" "file2bd103647639d.cpp" using C++ compiler: 'g++.exe (GCC) 14.2.0' make[1]: Entering directory '/d/temp/2025_07_21_18_20_16_5310/RtmpoTdIsE/sourceCpp-x86_64-w64-mingw32-1.1.0/sourcecpp_2bd105f3f521a' g++ -std=gnu++17 -I"D:/RCompile/recent/R/include" -DNDEBUG -I"D:/RCompile/CRANpkg/lib/4.6/Rcpp/include" -I"D:/temp/2025_07_21_18_20_16_5310/RtmpoTdIsE/sourceCpp-x86_64-w64-mingw32-1.1.0" -I"d:/rtools45/x86_64-w64-mingw32.static.posix/include" -pedantic -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c file2bd103647639d.cpp -o file2bd103647639d.o g++ -std=gnu++17 -shared -s -static-libgcc -o sourceCpp_4.dll tmp.def file2bd103647639d.o -Ld:/rtools45/x86_64-w64-mingw32.static.posix/lib/x64 -Ld:/rtools45/x86_64-w64-mingw32.static.posix/lib -LD:/RCompile/recent/R/bin/x64 -lR make[1]: Leaving directory '/d/temp/2025_07_21_18_20_16_5310/RtmpoTdIsE/sourceCpp-x86_64-w64-mingw32-1.1.0/sourcecpp_2bd105f3f521a' make[1]: Entering directory '/d/temp/2025_07_21_18_20_16_5310/RtmpoTdIsE/sourceCpp-x86_64-w64-mingw32-1.1.0/sourcecpp_2bd105f3f521a' make[1]: Leaving directory '/d/temp/2025_07_21_18_20_16_5310/RtmpoTdIsE/sourceCpp-x86_64-w64-mingw32-1.1.0/sourcecpp_2bd105f3f521a' [ FAIL 0 | WARN 0 | SKIP 0 | PASS 21 ] > detach("package:RcppXPtrUtils", unload = TRUE) > > proc.time() user system elapsed 0.92 0.21 13.12