Like the previous message from "lbusett", I did not succeed in compiling exactextractr from github.
After the following command...
devtools::install_github("isciences/exactextractr", lib="C:/Users/toto/Documents/essaiexactextractr")
R returns the following error message (cf below) :
C:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG -I"C:/Users/toto/Documents/R/win-library/3.6/Rcpp/include" -std=c++14 -I../windows/gdal2-2.2.3/include/geos -O2 -Wall -mtune=core2 -c RcppExports.cpp -o RcppExports.o
C:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG -I"C:/Users/toto/Documents/R/win-library/3.6/Rcpp/include" -std=c++14 -I../windows/gdal2-2.2.3/include/geos -O2 -Wall -mtune=core2 -c exact_extract.cpp -o exact_extract.o
In file included from exactextract/src/raster_stats.h:23:0,
from exact_extract.cpp:25:
exactextract/src/variance.h: In member function 'constexpr void exactextract::WestVariance::process(double, double) const':
exactextract/src/variance.h:42:15: error: assignment of member 'exactextract::WestVariance::sum_w' in read-only object
sum_w += w;
^
exactextract/src/variance.h:43:14: error: assignment of member 'exactextract::WestVariance::mean' in read-only object
mean += (w / sum_w) (x - mean_old);
^
exactextract/src/variance.h:44:11: error: assignment of member 'exactextract::WestVariance::t' in read-only object
t += w (x - mean_old) * (x - mean);
^
exactextract/src/variance.h:39:20: error: invalid return type 'void' of constexpr function 'constexpr void exactextract::WestVariance::process(double, double) const'
constexpr void process(double x, double w) {
^
make: *** [C:/PROGRA~1/R/R-36~1.3/etc/i386/Makeconf:215: exact_extract.o] Error 1
ERROR: compilation failed for package 'exactextractr'
removing 'C:/Users/toto/Documents/essaiexactextractr/exactextractr'
Erreur : Failed to install 'exactextractr' from GitHub:
(converti depuis l'avis) installation of package ‘C:/Users/toto/AppData/Local/Temp/RtmpC8rHUT/file14206e5e77af/exactextractr_0.4.0.tar.gz’ had non-zero exit status
Hello Mr. Baston,
Like the previous message from "lbusett", I did not succeed in compiling exactextractr from github. After the following command... devtools::install_github("isciences/exactextractr", lib="C:/Users/toto/Documents/essaiexactextractr")
R returns the following error message (cf below) :
C:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG -I"C:/Users/toto/Documents/R/win-library/3.6/Rcpp/include" -std=c++14 -I../windows/gdal2-2.2.3/include/geos -O2 -Wall -mtune=core2 -c RcppExports.cpp -o RcppExports.o C:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG -I"C:/Users/toto/Documents/R/win-library/3.6/Rcpp/include" -std=c++14 -I../windows/gdal2-2.2.3/include/geos -O2 -Wall -mtune=core2 -c exact_extract.cpp -o exact_extract.o In file included from exactextract/src/raster_stats.h:23:0, from exact_extract.cpp:25: exactextract/src/variance.h: In member function 'constexpr void exactextract::WestVariance::process(double, double) const': exactextract/src/variance.h:42:15: error: assignment of member 'exactextract::WestVariance::sum_w' in read-only object sum_w += w; ^ exactextract/src/variance.h:43:14: error: assignment of member 'exactextract::WestVariance::mean' in read-only object mean += (w / sum_w) (x - mean_old); ^ exactextract/src/variance.h:44:11: error: assignment of member 'exactextract::WestVariance::t' in read-only object t += w (x - mean_old) * (x - mean); ^ exactextract/src/variance.h:39:20: error: invalid return type 'void' of constexpr function 'constexpr void exactextract::WestVariance::process(double, double) const' constexpr void process(double x, double w) { ^ make: *** [C:/PROGRA~1/R/R-36~1.3/etc/i386/Makeconf:215: exact_extract.o] Error 1 ERROR: compilation failed for package 'exactextractr'
Thank you forward Loïc