[Win32utils-devel] FFI and msvcrt

Heesob Park phasis at gmail.com
Sat Apr 7 14:47:50 UTC 2012


2012/4/7 Daniel Berger <djberg96 at gmail.com>

> Hi,
> I've been using FFI with a Ruby 1.9.3 built with MSVC++ and it's been
> working well. One thing I've run into though is this:
> ffi_lib :msvcrt
> But that's not the runtime I want. But I don't want to hard code the
> runtime name either. I realize I could parse it out of RbConfig, but I
> was hoping for something nicer.
> Is there a way we could create an analogue to FFI::Library::LIBC for
> the MSVC runtime? Something like FFI::Library::MSVCRT ?
I can find msvcrt runtime like this:

def find_msvcrt
require 'rbconfig'

Did you mean this seems ugly?

Well, I cannot find a nicer method than above one.


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

More information about the win32utils-devel mailing list