[Win32utils-devel] ffi and msvc

Heesob Park phasis at gmail.com
Sun Jan 8 21:10:06 EST 2012


Hi,

2012/1/3 Heesob Park <phasis at gmail.com>

> Hi,
>
> 2012/1/3 Daniel Berger <djberg96 at gmail.com>
>
>> Hi.
>>
>> <snip>
>>
>> > 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
>>
>> Excellent!
>>
>> Is it possible to build with Ruby 1.8.x or 1.9.x as well?
>>
>>
> I succeeded in building with Ruby 1.8.7-p352 and Ruby 1.9.3-p0 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.
>>
>>
> That is technically possible, but it is a time-consuming and cumbersome
> process.
> Is there anybody willing to make a patch?
> If not I'll make it until the end of this month.
>
>

I forked ffi and made "just work" version of mingw and mswin32.

You can download it from https://github.com/phasis68/ffi

Regards,

Park Heesob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/win32utils-devel/attachments/20120109/c695486e/attachment.html>


More information about the win32utils-devel mailing list