[Rd] Compiling 64bit static library for Windows (Rtools33, MSYS2, cross-compile on linux)

Sue McDonald sudomeme at gmail.com
Fri May 29 22:16:57 CEST 2015

My apologies for cross-posting. I found this site, after I had posted on

I need to compile several static libraries (C & Fortran) which will later
be linked with an R package. Rtools33 directory includes /i686-w64-mingw32
directory which I understand creates 32 bit binaries. Yet, there are other
64 bit directories as well.

I have three related questions:


   Can Rtools33 be used to compile static libraries as a separate step
   using -m64 flag?

   MSYS2 is very convenient for compiling many of these libraries. Can a
   static library compiled with x86_64-w64-mingw32 (gcc 4.9.2) be used with
   Rtools33 (v 4.6.2)?

   Can a static library compiled using x86_64-w64-mingw32-gcc
   cross-compiler (v 4.6.2) on linux be used with Rtools33?

Options 2 and 3 are preferable for convenience and speed.

Compiling all libraries as part of the R-package is not currently an option.



	[[alternative HTML version deleted]]

More information about the R-devel mailing list