3

Hey I know there are a lot of rmagick threads up but I havn't been able to find anything on the current errors I am getting. Everyone gets to the point I am at and it just seems to work for them.

So I have ImageMagick 6.7.1-Q16 installed, I included it in my path without spaces and I installed the c/c++ headers. I have the Dev-Kit properly installed and working I am trying to now install the rmagick gem using this line:

gem install rmagick --platform=ruby -- --with-opt-lib=c:/ImageMagick-6.7.1-Q16/lib --   with-opt-include:/ImageMagick-6.7.1-Q16/include

which I came up with after looking here and at several other places including this post. This seems to have gotten me the farthest but when I run that command it sits for several minutes trying to build the gem and then gives me a huge list of undefined reference errors in all of the .c files inside C:\Ruby192\lib\ruby\gems\1.9.1\gems\rmagick-2.13.1\ext\RMagick/

I can't see all the files it says have reference errors but a few of them are:

rmutil.c undefined reference to 'CloneImageInfo'

rmimage.c undefined reference to 'DestroyExceptionInfo'

rminfo.c undefined reference to 'GetImageOption'

rmmontage.c undefined reference to 'CloneImageInfo'

rmain.c undefined reference to 'SetFatalErrorHandler'

rmpixel.c undefined reference to 'Allocate Image'

rmstruct.c undefined reference to 'CloneString'

there are hundreds of errors but they all seem to reference the same 5-6 resources.

I have been working on this for a day and a half now and am really starting to get frustrated any help would be appreciated.

Community
  • 1
  • 1
Ryan
  • 5,644
  • 3
  • 38
  • 66
  • Is there a reason you aren't using prebuilt binaries and gem? – Eric Aug 22 '11 at 17:49
  • @Eric Not exactly sure what you mean, if you mean have I just tried doing 'gem install rmagick' after installing Imagemagick yes I have tried that and I get multiple different errors. what I describe above is what I have come up with after hours of trying every other method of installing rmagick that I have been able to find. Including the bundled rmagick-win32/ImageMagick package that is available for download. – Ryan Aug 22 '11 at 18:02
  • I can almost guarantee that dealing with the "multiple different errors" in a standard install will be easier to fix than building it from source on Windows! – Eric Aug 23 '11 at 19:49
  • I am not building anything with that line I am simply trying to install a gem that is already downloaded and associate it with imagemagick since it does not seem to be doing it by itself. and what I am getting now is what I have been able to get to after fixing those errors I mentioned. So please help or stop commenting. Thank you – Ryan Aug 24 '11 at 06:16

2 Answers2

3

Installing the 32bit version of ImageMagick did the trick for me too.

Also remember to add these env variables:

CPATH=C:\Program Files (x86)\ImageMagick-6.7.9-Q16\include
LIBRARY_PATH=C:\Program Files (x86)\ImageMagick-6.7.9-Q16\lib
Yodacheese
  • 4,787
  • 5
  • 34
  • 42
2

After doing everything in those posts I did the one thing that none of them mentioned. I went and installed the 32bit version of ImageMagick instead of the 64bit. After doing that I used the same command and it installed. I hope that this helps.

Ryan
  • 5,644
  • 3
  • 38
  • 66