[Win32utils-devel] ffi and msvc

Daniel Berger djberg96 at gmail.com
Mon Jan 2 11:02:07 EST 2012



> I managed to compile and make ffi_c.so with Visual Studio 2010 Express
> and Ruby 2.0.0dev.
> I can build libffi library easily using the wrapper msvcc.sh.
> But, I have to edit source codes and Makefile of ext/ffi_c manulally
> for the incompatibility of cl.exe and nmake.exe with gcc.
> The changes of source codes are mainly like this:
> #ifndef _MSC_VER
> #include <sys/param.h>
> #endif
> #ifndef _MSC_VER
> #include <stdbool.h>
> #else
> typedef int bool;
> #define true 1
> #define false 0
> #endif


Is it possible to build with Ruby 1.8.x or 1.9.x as well?

Also, is it possible to patch the source in a way that it would "just work" based on the build type (mingw vs mswin32). If so, please submit a patch to Wayne. If not, perhaps Wayne could be convinced to add a branch to the ffi project. Or perhaps a fork is in order.

What do you think?



More information about the win32utils-devel mailing list