[Win32utils-devel] Possible problem with msvcrt vs msvcrXX

Daniel Berger djberg96 at gmail.com
Thu Jun 25 00:11:13 EDT 2009



> -----Original Message-----
> From: win32utils-devel-bounces at rubyforge.org [mailto:win32utils-devel-
> bounces at rubyforge.org] On Behalf Of Heesob Park
> Sent: Wednesday, June 24, 2009 9:20 PM
> To: Development and ideas for win32utils projects
> Subject: Re: [Win32utils-devel] Possible problem with msvcrt vs msvcrXX
> 
> Hi,
> 
> 2009/6/25 Daniel Berger <djberg96 at gmail.com>:
> >
> >
> >> -----Original Message-----
> >> From: win32utils-devel-bounces at rubyforge.org [mailto:win32utils-
> devel-
> >> bounces at rubyforge.org] On Behalf Of Heesob Park
> >> Sent: Wednesday, June 24, 2009 7:28 PM
> >> To: Development and ideas for win32utils projects
> >> Subject: Re: [Win32utils-devel] Possible problem with msvcrt vs
> msvcrXX
> >>
> >> Hi,
> >>
> >> 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
> >
> > The ruby.exe.manifest *does* exist. I checked. It's also checked in
> the windows-api code:
> >
> >   # With Microsoft Visual C++ 8 and later users should use the
> associated
> >   # DLL instead of msvcrt directly, if possible.
> >   if CONFIG['host_os'].split('_')[1]
> >      if CONFIG['host_os'].split('_')[1].to_i >= 80 &&
> >         File.exists?(File.join(CONFIG['bindir'],
> 'ruby.exe.manifest'))
> >      then
> >         MSVCRT_DLL = 'msvcr' + CONFIG['host_os'].split('_')[1]
> >      else
> >         MSVCRT_DLL = 'msvcrt'
> >      end
> >   else
> >      MSVCRT_DLL = 'msvcrt'
> >   end
> >
> Did you install ruby binary and Microsoft Visual C++ 8 on the same
> computer?

Yes.

> If not, Microsoft.VC90.CRT.manifest and msvcr90.dll must exist on the
> ruby bin folder.

I must have a path issue.

Regards,

Dan



More information about the win32utils-devel mailing list