RcppCore/Rcpp — pull request #217 by dabookshah (2014-12-19 03:22:28+00:00)
Title: Changes required to build for visual studio

For some reason every reference I can find to building Rcpp with Visual Studio says it is impossible. This is completely wrong. I've attached a relatively minor patch that successfully builds Rcpp under Visual Studio Express 2012 for Desktop (the free version, compiler version 11).
-Missing typename in proxy.h
-Replaced one use of "and" by "&&".
-Obvious edits to compiler.h
-Changes to math.h to include a new file, which defines missing functions expm1, log1p
-Inclusion of a suitable inttypes.h. Probably only a few lines of this are actually relevant.
-Change to Date.cpp to include io.h and stdint.h instead of unistd.h

The only change I am unhappy with is the one to, inst/include/Rcpp/sugar/block/Vectorized_Math.h, it is too heavily templated for me to to really understand - Although it seems that the relevant two lines might be removed rather than changed using conditional compilation. Required compilation options are compiler define snprintf=_snprintf and /sdl-.

Again, I have been using this set-up for over a year without any problems, and would like to have it integrated into the main branch. This is a good idea because R is widely used on windows, but the MinGW port of g++/gcc to windows is terrible, especially its debugger and especially for heavily templated code such as Rcpp. A compiler like Visual Studio makes the whole thing much more useable.