This morning and today I spent almost four hours trying to deal with the fact that our R package DNAtools
would not compile under Windows. The issue originated with a win-builder build which was giving errors like this:
I"D:/RCompile/recent/R/include" -DNDEBUG -I"d:/RCompile/CRANpkg/lib/3.4/Rcpp/include" -I"d:/Compiler/gcc-4.9.3/local330/include" -c DNTRare.cpp -o DNTRare.o
ID:/RCompile/recent/R/include: not found
and I replicated this (far too many times) on my Windows VM on my Mac.
In the end this boiled down to the presence of our Makevars
file which contained only one line:
CXX_STD = CXX14
Deleting fixed the problem and it now compiles just fine. It compiles fine locally, and I am waiting for the response from the win-builder site. I do not anticipate an issue, but it would be useful to understand what was going wrong. I must admit that I have forgotten what aspects of the C++14 standard we are using, but I do know that changing line to
PKG_CXXFLAGS= -std=c++14
which I use in my multicool
package gives me a different pain, with the compiler being unable to locate Rccp.h
after seeing a #include
directive.