0

When I try gem install rmagick, I get many errors like
      undefined reference to `GetExceptionInfo'

There are also undefined references to

AverageImages DestroyConstitute GetExceptionInfo MapImage MapImages MedianFilterImage RadialBlurImage RadialBlurImageChannel RecolorImage ReduceNoiseImage

These functions all appear to be in CORE_RL_magick_.lib but I can't find any combination of --with-opt-lib or --with-opt-dir or environment variables like LDFLAGS or CFLAGS or LIBRARY_PATH or LD_LIBRARY_PATH that allows "linking shared-object RMagick2.so" to succeed - or that make any difference at all.

Where is this function defined? How can I bring it in to the link (ld) step?

I'm running
  ImageMagick 6.7.7-8 Q8
  DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe (gcc 4.5.2)

Thanks for any ideas.


Some references:

Community
  • 1
  • 1
JONATHAN SEDER
  • 376
  • 1
  • 4
  • Along the way I did "gem update --system" (to 2.4.2) which created other make errors. "gem update --system 2.0.0" again allows me to build native extensions... but not rmagick. – JONATHAN SEDER Jul 24 '14 at 22:20
  • CORE_RL_magick_.lib for ImageMagick 6778, 6803, and 6895 all export _GetExceptionInfo (with one leading underscore) but ld fails with "undefined reference to `GetExceptionInfo'" (no underscore). Is this a problem with _stdcall decoration? Any ideas, anyone? – JONATHAN SEDER Jul 24 '14 at 23:45

1 Answers1

3

Maybe this will help someone some day.

I got past this by upgrading to Ruby 2.0.0p481 32-bit (current as of this note). Next I installed the 32-bit DevKit. I also installed ImageMagick 6.7.7-8 (though other versions might work) and placed it first in my PATH.

With that,

gem install rmagick --platform=ruby -- --with-opt-dir=c:\Tools\ImageMagick

ran fine and installed rmagick 2.13.2.

JONATHAN SEDER
  • 376
  • 1
  • 4
  • Worked for me also in the combination rmagick 2.13.4, ImageMagick-6.9.0-10 and ruby 2.1.5 (64bit). In addition I needed the parameter LD_LIBRARY_PATH (see also http://stackoverflow.com/questions/4451213/ruby-1-9-2-how-to-install-rmagick-on-windows) – knut Mar 21 '15 at 20:08