The external software at http://www.stats.ox.ac.uk/pub/Rtools/libs.html is made by cross-compiling on x86_64 Linux. The 32- and 64-bit versions are made separately under W{32,64}soft, and then merged (the 32-bit libs copied to lib/i386, the 64-bit libs to lib/x64). The include files are common apart from gmp, which has a custom gmp.h choosing between gmp-i386.h and gmp-x64.h. The sources used, including any patches used, are at http://www.stats.ox.ac.uk/pub/Rtools/goodies/sources/ . The generic configure call is one of ./configure --host=i686-w64-mingw32 --enable-static --disable-shared \ -prefix=.../W32soft CFLAGS=-O2 CXXFLAGS=-O2 ./configure --host=x86_64-w64-mingw32 --enable-static --disable-shared \ -prefix=.../W64soft CFLAGS=-O2 CXXFLAGS=-O2 followed by make -j20 make install with exceptions (64-bit versions, ... replaces an absolute path on my machine): bzip2: make CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar RANLIB=x86_64-w64-mingw32-ranlib CFLAGS=-O2 libbz2.a touch bzip2 bzip2recover make install PREFIX=.../W64soft gdal: ./configure --host=x86_64-w64-mingw32 --enable-static --disable-shared \ --prefix=.../W64soft CFLAGS=-O2 CXXFLAGS=-O2 --without-curl \ --with-expat=.../W64soft --with-odbc --without-geos --with-static-proj4 \ --with-sqlite3=.../W64soft libpng: ./configure --host=x86_64-w64-mingw32 --enable-static --disable-shared \ -prefix=.../W64soft CFLAGS=-O2 CXXFLAGS=-O2 LIBS=-L.../W64soft/lib \ CPPFLAGS=-I.../W64soft/include libxml2: ./configure --host=x86_64-w64-mingw32 --enable-static --disable-shared \ prefix=.../W64soft CFLAGS=-O2 CXXFLAGS=-O2 --without-python \ --with-zlib=.../W64soft --with-iconv=.../W64soft --without-lzma mpfr: ./configure --host=x86_64-w64-mingw32 --enable-static --disable-shared \ -prefix=.../W64soft CFLAGS=-O2 CXXFLAGS=-O2 --with-gmp=.../W64soft netcdf: ./configure --host=x86_64-w64-mingw32 --enable-static --disable-shared \ -prefix=.../W64soft CFLAGS=-O2 CXXFLAGS=-O2 --disable-netcdf-4 --disable-dap or for use with ncdf4: ./configure --host=x86_64-w64-mingw32 --enable-static --disable-shared \ -prefix=.../W64soft CFLAGS=-O2 CXXFLAGS=-O2 \ --disable-dynamic-loading --disable-dap \ CPPFLAGS="-I.../h5-libwin/include/hdf5 -I.../h5-libwin/include/hdf5_hl -I.../h5-libwin/include/cmakeconf" \ LDFLAGS=-L.../h5-libwin/lib/x64 pcre: ./configure --host=x86_64-w64-mingw32 --enable-static --disable-shared \ -prefix=.../W64soft CFLAGS=-O2 CXXFLAGS=-O2 \ --enable-utf --enable-unicode-properties --enable-jit --disable-cpp proj: ./configure --host=x86_64-w64-mingw32 --enable-static --disable-shared \ -prefix=.../W64soft CFLAGS=-O2 CXXFLAGS=-O2 --without-mutex tiff: ./configure --host=x86_64-w64-mingw32 --enable-static --disable-shared \ --disable-lzma -prefix=.../W64soft CFLAGS=-O2 CXXFLAGS=-O2 \ CPPFLAGS=-I.../W64soft/include LIBS=-L.../W64soft/lib udunits2: ./configure --host=x86_64-w64-mingw32 --enable-static --disable-shared \ -prefix=.../W64soft CFLAGS=-O2 CXXFLAGS=-O2 \ LDFLAGS=-L.../W64soft/lib CPPFLAGS=-I.../W64soft/include zlib: env CROSS_PREFIX=x86_64-w64-mingw32- ./configure --static -prefix=.../W64soft