'R package: Error appears not in Windows but in Linux

guys.

I am currently trying to build an R package (using rcpp). By this suggestion, I encountered an error, which was fixed by putting the following line in src/Makevar and/or src/Makevar.win.

PKG_CXXFLAGS = -DRCPP_ARMADILLO_FIX_Field

However, this error disappeared when I run my function in Windows on my laptop, but it again appeared in Linux. (I usually wirte the code in Windows on my laptop and run the code by using Linux for parallel computing provided by my university) It seems that that line can remove the flag in Windows but cannot remove it in Linux.

How can this happen, and how can I fix this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source