rmagick not building on windows 7 undefined reference errors

∥☆過路亽.° 提交于 2019-12-10 19:17:39

问题


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.


回答1:


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



回答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.



来源:https://stackoverflow.com/questions/7151030/rmagick-not-building-on-windows-7-undefined-reference-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!