[Win32utils-devel] ffi and msvc

Daniel Berger djberg96 at gmail.com
Tue Jan 10 00:53:29 EST 2012


On Mon, Jan 9, 2012 at 8:52 PM, Heesob Park <phasis at gmail.com> wrote:
> Hi,
>
> 2012/1/10 Daniel Berger <djberg96 at gmail.com>
>>
>> Hi,
>>
>> > My test compiler is MSVC++ 10 and it has stdint.h
>> > It seems MSVC++ 9 don't have stdint.h
>> >
>> > Could you try replacing
>> >
>> > #if defined(_MSC_VER) && !defined(INT8_MIN)
>> > #  include <stdint.h>
>> > #endif
>> >
>> > to
>> >
>> > #if (_MSC_VER >= 16) && !defined(INT8_MIN)
>> > #  include <stdint.h>
>> > #endif
>> > ?
>>
>> I suspect you meant 1600. I tried that but then it leads to other
>> errors because it doesn't understand some of the data types. I think
>> the lack of stdint.h in MSVC 9 is considered a bug by many.
>>
> Yes, you are right.
>
>>
>> I think the best thing to do is to put stdint.h directly into your ffi
>> repo, and use that file if _MSV_VER < 1600. Just copy the one out of
>> MSVC 10.
>>
>
> OK, I just copied the stdint.h out of MSVC 10.
> And I confirmd it's working on MSVC 9 compiled ruby 1.8.7 and 1.9.3.

Great!

How are you installing it locally? I can't seem to use the rake task
because it demands rdoc, and rdoc is demanding iconv, which doesn't
appear to support MSVC++ / nmake. I tried running ruby extconf.rb +
nmake + nmake install, but that doesn't appear to be the right way to
do things.

Thanks,

Dan


More information about the win32utils-devel mailing list