-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpp version won't work on windows #56
Comments
Confirmed. |
Should be fixed by b1efa6b |
@gaborcsardi I have installed the dev version of this package but it doesn't display the progress bar using my example code above. |
This works for me. What is your platform? Is this the latest progress version? |
@gaborcsardi Windows 7 X64. The progress version is the latest on Github, installed via
|
@gaborcsardi I did a simple debug. all the three functions below always return 0. progress/inst/include/RProgress.h Line 278 in a2678e8
Moreover, even I force the Thanks. |
What's your rstudio version? |
Version 1.1.423 |
What' more, I just confirmed that it won't work for the RGui either. |
Yeah, looking at the code, RGui is expected I think. But RStudio should work. What is your
|
It's ExampleRcpp::cppFunction('void test() {
char *v = std::getenv("RSTUDIO");
Rcpp::Rcout << (v == 0);
}')
test()
# returns 1 meaning it's empty. By contrast, if you change ”RSTUDIO" to "PATH", it returns 0. Moreover,I find if I change the progress/inst/include/RProgress.h Line 128 in a2678e8
So,
|
The example to my second point (change Rcpp::cppFunction('void test2() {
std::string a = "abcd";
std::string b = "efgh%";
Rprintf(a.c_str());
Rprintf(b.c_str());
}')
test2()
# abcdWarning message:
# In test2() : printing of extremely long output is truncated |
Oh, yeah, there is a bug here. The But that's independent of the |
I'll think about how to detect RStudio from C++ code then.... |
Looks like a bunch of other env vars are there from C as well:
This might be an RStudio bug then? |
Looks like that if you set the variable explicitly with |
Yes, you are right. Calling |
Maybe, but I don't know how that would be even possible. It is R calling the external code via I'll fix the other bugs as well, the |
Thanks! 😃 |
Hi, thanks for the useful package and it works fine on my mac for both the R version and Cpp version. However, the cpp version of progress bar fails to display on windows. Here's a minimal repro (using the code from your test package):
my session info
The text was updated successfully, but these errors were encountered: