Forum: Ruby compile rmagick on win32

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
zhimin.wen (Guest)
on 2005-11-22 04:20
(Received via mailing list)
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!
djberg96 (Guest)
on 2005-11-22 05:29
(Received via mailing list)
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
djberg96 (Guest)
on 2005-11-22 15:49
(Received via mailing list)
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
This topic is locked and can not be replied to.