r-lib / cpp11

cpp11 helps you to interact with R objects using C++ code.
https://cpp11.r-lib.org/
Other
199 stars 46 forks source link

Fix Windows error #214

Closed sbearrows closed 3 years ago

sbearrows commented 3 years ago

Attempt to fix windows error

jimhester commented 3 years ago

Maybe try creating a branch and PR with usethis::pr_init() rather than via the git command line.

I suspect the reason this is failing on windows has to do with initializing this in global scope https://github.com/r-lib/cpp11/blob/ac7374e81bb9e8fe35b21424c53e21b91b00c9e4/inst/include/cpp11/function.hpp#L78.

Maybe try putting it as a static variable inside the functions instead.

jimhester commented 3 years ago

Closed by #215