rmagick 未在 Windows 7 上构建未定义的引用错误

发布于 2024-11-30 23:42:39 字数 1290 浏览 1 评论 0原文

嘿,我知道有很多 rmagick 线程,但我无法找到有关我当前遇到的错误的任何内容。每个人都达到了我现在的水平,这似乎对他们有用。

所以我安装了 ImageMagick 6.7.1-Q16,我将其包含在我的路径中,没有空格,并且安装了 c/c++ 标头。我已经正确安装了开发工具包并正在工作,我现在正在尝试使用以下行安装 rmagick gem:

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

这是我在查看 此处 以及其他几个地方,包括 这篇文章 。 这似乎已经让我走得最远,但是当我运行该命令时,它会等待几分钟尝试构建 gem,然后在 C:\Ruby192\lib\ 内的所有 .c 文件中给我一个巨大的未定义引用错误列表。 ruby\gems\1.9.1\gems\rmagick-2.13.1\ext\RMagick/

我看不到它所说的所有文件都有引用错误,但其中一些是:

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'

有数百个错误,但它们似乎都引用了相同的 5-6 个资源。

我已经为此工作了一天半,我真的开始感到沮丧,任何帮助将不胜感激。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

留蓝 2024-12-07 23:42:39

安装 32 位版本的 ImageMagick 也对我有用。

还记得添加这些环境变量:

CPATH=C:\Program Files (x86)\ImageMagick-6.7.9-Q16\include
LIBRARY_PATH=C:\Program Files (x86)\ImageMagick-6.7.9-Q16\lib

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
亽野灬性zι浪 2024-12-07 23:42:39

在完成了这些帖子中的所有内容之后,我做了他们都没有提到的一件事。我安装了 32 位版本的 ImageMagick 而不是 64 位版本。完成此操作后,我使用相同的命令并安装了它。我希望这会有所帮助。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文