# Problem building Ruby addon with Vista

**URL:** <https://www.ruby-forum.com/t/problem-building-ruby-addon-with-vista/124014>\
**Category:** Ruby\
**Created:** [December 23, 2007, 3:15pm UTC](https://www.ruby-forum.com/t/problem-building-ruby-addon-with-vista/124014 "2007-12-23T15:15:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julian\_Harnath](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de0a6/32.png) [@Julian\_Harnath](https://www.ruby-forum.com/u/Julian_Harnath)\
**Post date:** [December 23, 2007, 3:15pm UTC](https://www.ruby-forum.com/t/problem-building-ruby-addon-with-vista/124014/1 "2007-12-23T15:15:45Z")

</div>

Hello!

I’m currently looking into developing Ruby addons. I’d like to use  
Windows  
Vista with VC++ 2005 as development platform. But I have a problem which  
seems to be related to some DLL incompatibility.  
My addon is currently empty, it only contains an empty init function.  
But  
as soon as I try to use it I get the following error when trying to run  
it:

“The procedure entry point “\_except\_handler4\_common” could not be  
located  
in  
the dynamic link library MSVCR80.dll”

Searching google for “\_execpt\_handler4\_common” results in various pages  
describing similiar problems (although none of them is related to Ruby).  
It seems to be some internal execption handler function which is only  
present in Vista. I suspect that the “msvcrt-ruby18.dll” which comes  
with  
the Windows build of Ruby is incompatible with the libraries used by  
Visual Studio 2005 (SP1) on Vista.

Does anyone have an idea how to fix this? Did anyone successfully  
compile  
a Ruby addon with Vista, and if yes, how?

---

<div class="post-metadata">

**Author:** ![Julian\_Harnath](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de0a6/32.png) [@Julian\_Harnath](https://www.ruby-forum.com/u/Julian_Harnath)\
**Post date:** [December 23, 2007, 4:15pm UTC](https://www.ruby-forum.com/t/problem-building-ruby-addon-with-vista/124014/2 "2007-12-23T16:15:29Z")

</div>

On 23 dic, 11:11, “Julian Harnath” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> the dynamic link library MSVCR80.dll"
> 
> Searching google for “\_execpt\_handler4\_common” results in various pages  
> describing similiar problems (although none of them is related to Ruby).  
> It seems to be some internal execption handler function which is only  
> present in Vista. I suspect that the “msvcrt-ruby18.dll” which comes with  
> the Windows build of Ruby is incompatible with the libraries used by  
> Visual Studio 2005 (SP1) on Vista.

Yes, msvcrt-ruby18 is build with VC6, which link to MSVCRT.dll  
(version 6.0).

to make Ruby MSVCR80.dll -compatible, you need to build ruby by  
yourself, also compiling all the ruby dependencies with it, since you  
can ran into cross-runtime malloc/free issues and random crashes.

There are a few looong threads you can search on google groups about  
this (ruby-talk and ruby-core).

> Does anyone have an idea how to fix this? Did anyone successfully compile  
> a Ruby addon with Vista, and if yes, how?

There is a lot of manual hacking in rbconfig.rb to make it work. I  
suggest avoid it and use the path I described earlier, or just drop VC

- 2005 and use MinGW.

Regards,

Luis L.

---

<div class="post-metadata">

**Author:** ![Julian\_Harnath](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de0a6/32.png) [@Julian\_Harnath](https://www.ruby-forum.com/u/Julian_Harnath)\
**Post date:** [December 23, 2007, 6:15pm UTC](https://www.ruby-forum.com/t/problem-building-ruby-addon-with-vista/124014/3 "2007-12-23T18:15:36Z")

</div>

Am 23.12.2007, 16:12 Uhr, schrieb Luis L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> There is a lot of manual hacking in rbconfig.rb to make it work. I  
> suggest avoid it and use the path I described earlier, or just drop VC
> 
> - 2005 and use MinGW.

Ok, I will look into that.

Thanks!
