[Win32utils-devel] Possible problem with msvcrt vs msvcrXX

Heesob Park phasis at gmail.com
Wed Jun 24 21:28:13 EDT 2009


2009/6/25 Daniel Berger <djberg96 at gmail.com>:
> Hi,
> I tried this with a version of Ruby I built with VC++ 2008:
> irb(main):005:0> strlen = API.new('strlen', 'P', 'L', 'msvcrt')
> => #<Win32::API:0x4774684>
> irb(main):006:0> strlen = API.new('strlen', 'P', 'L', 'msvcr90')
> Win32::API::LoadLibraryError: LoadLibrary() function failed for 'msvcr90':
> The specified module could not be found.
>        from (irb):6:in `initialize'
>        from (irb):6:in `new'
>        from (irb):6
> Do I have an environment issue? Do we need to revisit windows-api with
> regards to how it sets MSVCRT_DLL?
I remember I saw almost same issue a few years ago :)

MSVCR90.dll is not installed in system32, but in the side-by-side
folder, hence the manifest is required.

Create 'ruby.exe.manifest' in the ruby's bin folder like this:
mt -inputresource:ruby.exe;2 -out:ruby.exe.manifest


Park Heesob

More information about the win32utils-devel mailing list