Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork219
Closed
Description
When writing atry() function to check for compile errors fromsourceCpp the compilation error is always printed to the console, regardless of whichever combinations oftry(),suppressMessages(),suppressWarnings() orsink are used.
Reprex:
dcode<-"//[[Rcpp::export]]\n int fun(int x) { const int y; return x; }"status<- suppressWarnings(suppressMessages(output<- capture.output( try(Rcpp::sourceCpp(code=dcode,verbose=FALSE,echo=FALSE),silent=TRUE))))
Created on 2023-03-24 withreprex v2.0.2
fileeed07e197428.cpp:2:29: error: default initialization of an object of consttype'const int' int fun(int x) { const int y;return x; } ^ = 01 error generated.make:*** [fileeed07e197428.o] Error 1
Metadata
Metadata
Assignees
Labels
No labels