# Compile rmagick on win32

**URL:** <https://www.ruby-forum.com/t/compile-rmagick-on-win32/48555>\
**Category:** Ruby\
**Created:** [November 22, 2005, 3:20am UTC](https://www.ruby-forum.com/t/compile-rmagick-on-win32/48555 "2005-11-22T03:20:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhimin.wen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/c2a13f/32.png) [@zhimin.wen](https://www.ruby-forum.com/u/zhimin.wen)\
**Post date:** [November 22, 2005, 3:20am UTC](https://www.ruby-forum.com/t/compile-rmagick-on-win32/48555/1 "2005-11-22T03:20:59Z")

</div>

Want to compile the rmagick-1.9.3 on win32 to get the latest version  
intstead of the pre-compiled gem :).

after run,  
ruby extconf.rb --with-rmagic-dir=path to the ImageMagick dir  
I could get the makefile, but when compile, the following eror come  
out,

RMagick-1.9.3\ext\RMagick\rmagick.h(114) : error C2371: ‘boolean’ :  
redefinition; different basic type

Have looked through the documentation, seems like no info on how to  
compile on win32?  
Any help? Thanks!

---

<div class="post-metadata">

**Author:** ![zhimin.wen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/c2a13f/32.png) [@zhimin.wen](https://www.ruby-forum.com/u/zhimin.wen)\
**Post date:** [November 22, 2005, 4:29am UTC](https://www.ruby-forum.com/t/compile-rmagick-on-win32/48555/2 "2005-11-22T04:29:20Z")

</div>

newbie wrote:

> Have looked through the documentation, seems like no info on how to  
> compile on win32?  
> Any help? Thanks!

The windows.h file already defines a “boolean” type, so that would  
explain the error. Try adding this to the extconf.rb file:

have\_type(“boolean”)

Then, within rmagick.h, surround line 114 with “ifndef HAVE\_TYPE” and  
“endif”.

I don’t know if that’s the only issue, but it should solve that one at  
least.

- Dan

---

<div class="post-metadata">

**Author:** ![zhimin.wen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/c2a13f/32.png) [@zhimin.wen](https://www.ruby-forum.com/u/zhimin.wen)\
**Post date:** [November 22, 2005, 2:49pm UTC](https://www.ruby-forum.com/t/compile-rmagick-on-win32/48555/3 "2005-11-22T14:49:21Z")

</div>

Daniel B. wrote:

> > redefinition; different basic type  
> > Then, within rmagick.h, surround line 114 with “ifndef HAVE\_TYPE” and  
> > “endif”.
> 
> I don’t know if that’s the only issue, but it should solve that one at  
> least.
> 
> - Dan

Oh, it looks like there is no extconf.rb file. Just comment out lines  
109-114 and see how it goes.

- Dan
