checking for LF line-endings in source and make files and shell scripts
checking for empty or unneeded directories
building 'rayballer_0.1.0.tar.gz'
Installing package into ‘D:/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
installing source package 'rayballer' ...
libs
c:/Rtools/mingw_64/bin/g++ -I"C:/R/R-35~1.2/include" -DNDEBUG -I"D:/Documents/R/win-library/3.5/Rcpp/include" -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_64/bin/g++ -I"C:/R/R-35~1.2/include" -DNDEBUG -I"D:/Documents/R/win-library/3.5/Rcpp/include" -O2 -Wall -mtune=generic -c generate_initial.cpp -o generate_initial.o
In file included from sphere.h:5:0,
from generate_initial.cpp:2:
material.h: In function 'vec3 random_in_unit_sphere()':
material.h:12:28: error: 'drand48' was not declared in this scope
p = 2.0 vec3(drand48(),drand48(),drand48()) - vec3(1,1,1);
^
material.h: In member function 'virtual bool dielectric::scatter(const ray&, const hit_record&, vec3&, ray&) const':
material.h:95:18: error: 'drand48' was not declared in this scope
if(drand48() < reflect_prob) {
^
In file included from generate_initial.cpp:4:0:
camera.h: In function 'vec3 random_in_unit_disk()':
camera.h:9:28: error: 'drand48' was not declared in this scope
p = 2.0 vec3(drand48(),drand48(),0) - vec3(1,1,0);
^
generate_initial.cpp: In function 'vec3 color(const ray&, hitable, int, const vec3&, const vec3&)':
generate_initial.cpp:11:27: error: 'MAXFLOAT' was not declared in this scope
if(world->hit(r, 0.001, MAXFLOAT, rec)) {
^
generate_initial.cpp: In function 'hitable random_scene()':
generate_initial.cpp:33:34: error: 'drand48' was not declared in this scope
float choose_mat = drand48();
^
generate_initial.cpp: In function 'Rcpp::List generate_initial(int, int, int, float, Rcpp::NumericVector, Rcpp::NumericVector, float, Rcpp::IntegerVector, Rcpp::NumericVector, Rcpp::NumericVector, Rcpp::NumericVector, Rcpp::NumericVector, Rcpp::List, int, Rcpp::NumericVector&, Rcpp::NumericVector&)':
generate_initial.cpp:103:37: error: 'drand48' was not declared in this scope
float u = float(i + drand48()) / float(nx);
^
generate_initial.cpp: In function 'vec3 color(const ray&, hitable, int, const vec3&, const vec3&)':
generate_initial.cpp:24:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make: [generate_initial.o] Error 1
ERROR: compilation failed for package 'rayballer'
removing 'D:/Documents/R/win-library/3.5/rayballer'
In R CMD INSTALL
Error in i.p(...) :
(converted from warning) installation of package ‘C:/Users/ADMINI~1/AppData/Local/Temp/RtmpCi93to/file24d53836f841aa/rayballer_0.1.0.tar.gz’ had non-zero exit status
This is my R session:
sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_People's Republic of China.936 LC_CTYPE=Chinese (Simplified)_People's Republic of China.936
[3] LC_MONETARY=Chinese (Simplified)_People's Republic of China.936 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_People's Republic of China.936
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] usethis_1.4.0 devtools_2.0.1
Yes, I noticed this issue on yesterday—drand48() isn’t available on windows. I’ll see if I can implement a suitably fast alternate random number generator.
Hi Tyler,
So wonderful package you have developed! However, when I install this package locally, I got this error:
Installing package into ‘D:/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified)
This is my R session:
Matrix products: default
locale: [1] LC_COLLATE=Chinese (Simplified)_People's Republic of China.936 LC_CTYPE=Chinese (Simplified)_People's Republic of China.936
[3] LC_MONETARY=Chinese (Simplified)_People's Republic of China.936 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_People's Republic of China.936
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] usethis_1.4.0 devtools_2.0.1
loaded via a namespace (and not attached): [1] Rcpp_1.0.0 rstudioapi_0.9.0 magrittr_1.5 pkgload_1.0.2 R6_2.4.0 rlang_0.3.1 tools_3.5.2
[8] pkgbuild_1.0.2 sessioninfo_1.1.1 cli_1.0.1 withr_2.1.2 remotes_2.0.2 yaml_2.2.0 assertthat_0.2.0 [15] digest_0.6.18 rprojroot_1.3-2 crayon_1.3.4 processx_3.2.1 callr_3.1.1 fs_1.2.6 ps_1.3.0
[22] testthat_2.0.1 memoise_1.1.0 glue_1.3.0 compiler_3.5.2 desc_1.2.0 backports_1.1.3 prettyunits_1.0.2
My computer system is Windows 7. Could you give some clues? Thanks a lot~~
Bests, Shisheng