如何链接Imagemagick库到Qt(windows) [英] How to Link Imagemagick library to Qt(windows)

查看:335
本文介绍了如何链接Imagemagick库到Qt(windows)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了一个应用程序与mac一个月了,我试图链接Qt与ImageMagick在Windows上。

I have developed an application with mac and for one month now, Im trying to link Qt with ImageMagick on windows.

我只是无法找到文件和版本

I just cant find the files and the version of Imagemagick library that need to be linked to Qt in order to make my application work on windows.

我已经尝试过大部分的库从这里

I have tried most of the libraries from here

这是我添加到.pro文件,而我在mac上开发

Thats the only thing I added to the .pro file while I was developing on a mac

INCLUDEPATH += . /opt/local/include/ImageMagick
LIBS += -L/opt/local/lib -lMagick++


$ b b

当我将它添加到我的.pro

When I add this to my .pro

INCLUDEPATH += C:/im6/include/ImageMagick
LIBS += C:/im6/lib/libMagickWand.a
LIBS += C:/im6/lib/libMagick++.a
LIBS += C:/im6/lib/libMagickCore.a
C:/im6/lib/libMagick++.a



我得到10.000+类似的错误:

I get 10.000 + simmilar errors to that:

(Image.o):C:\msys\1.0\home\cristy\ImageMagick-6.6.6-0/Magick++/lib/Image.cpp:4157: undefined reference to `__gxx_personality_sj0'

    C:/im6/lib/libMagick++.a(Image.o):C:\msys\1.0\home\cristy\ImageMagick-6.6.6-0/Magick++/lib/Image.cpp:4157: undefined reference to `_Unwind_SjLj_Register'

    C:/im6/lib/libMagick++.a(Image.o):C:\msys\1.0\home\cristy\ImageMagick-6.6.6-0/Magick++/lib/Image.cpp:4178: undefined reference to `_Unwind_SjLj_Unregister'

有关更多错误,请检查

For more errors check this

任何人都试图构建和部署一个ImageMagick应用程序使用qt在窗口?
在部署时需要链接哪些文件和哪些文件?

Has anyone tried to build and deploy an ImageMagick application using qt on windows ? Which files do I need to link while building and which files while deploying ?

推荐答案

我发现minGW工具集在Windows世界中被视为stepchild。我知道它不能帮助你的特殊情况,但我们有第三方库的许多问题,而尝试使用QT与minGW。

I have found that the minGW tool set is very much treated as a "stepchild" in the Windows world. I know it doesn't help your particular situation, but we had numerous problems with third-party libs while trying to use Qt with minGW. There were always extra steps, or non-existent build instructions that we had to figure out or tweak.

一旦我们切换到MSVC版本,所有这些问题就消失了。 。注意这并不意味着你必须使用Visual Studio(你仍然可以使用Qt creator),它只是意味着使用Visual Studio编译器。您可以使用Platform SDK免费获取编译器。如果这是一个选项,您可以通过立即切换来节省自己很多痛苦。这是不幸的,但这只是目前的现状,至少我们发现。

Once we switched to the MSVC version, all of those problems went away. Note that this doesn't mean you have to use Visual Studio (you can still use Qt creator), it just means that the Visual Studio compiler is being used. You can get the compiler for free using the Platform SDK. If this is an option, you might save yourself a lot of pain by switching now. It's unfortunate, but that is just the current status quo, at least as we discovered.

这篇关于如何链接Imagemagick库到Qt(windows)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆