ImageMagick and Qt Creator on Windows

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
djogon

ImageMagick and Qt Creator on Windows

Post by djogon »

Hello,

I have created an application that uses ImageMagick on OS X without much issues. I compiled and installed ImageMagick from sources and linked into my application without much trouble.

Now I am trying to do the same on Windows, but the MinGW compiler is always complaining when I try to link the libraries.

Could the issue be that the libraries are mostly compiled using Visual Studio? Do I have to recompile them with MinGW? How do I do that?

Does anyone have any suggestions or examples? My "pro" file has following entries for example

Code: Select all

macx {
INCLUDEPATH += /Developer/ImageMagick-6.5.4-2/Magick++/lib \
    /Developer/ImageMagick-6.5.4-2

LIBS += -lMagick++
}

win32 {
INCLUDEPATH += ./ImageMagick/lib \
    ./ImageMagick/include \
    ./ImageMagick

LIBS += ./ImageMagick/lib/CORE_RL_magick_.lib \
    ./ImageMagick/lib/CORE_RL_Magick++_.lib
}
On windows I placed the ImageMagick library under the main project folder and the paths are correct - linker finds the files, but cannot link.

I must be missing something simple - any help is appreciated.

Thanks.
ritchy029

Re: ImageMagick and Qt Creator on Windows

Post by ritchy029 »

Hi, I have a similar problem, with some differences :shock: .

The facts:
I compiled Magick++ with visual studio 2009 Express.
I have compiled QT with visual studio, and i am using the visual studio compiler from QtCreator to build my qt programs.

The good:
When i create a new project under visual studio using Magick++, no pro!
When i use QT creator with anything else (OpenCV, soundlibs, Ogre3D...) , no pro!

The bad:
When i try to build the same program as the one in visual (that worked in visual, see "The good"!), compilation is ok, but linker is crying:

Code: Select all

image_impl.obj:-1: error:  unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Image::Image(void)" (__imp_??0Image@Magick@@QAE@XZ) referenced in function "public: __thiscall CImage_Impl::CImage_Impl(void)" (??0CImage_Impl@@QAE@XZ)

image_impl.obj:-1: error:  unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::read(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?read@Image@Magick@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: virtual int __thiscall CImage_Impl::load(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?load@CImage_Impl@@UAEHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)

image_impl.obj:-1: error:  unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Magick::Image::~Image(void)" (__imp_??1Image@Magick@@UAE@XZ) referenced in function "public: virtual __thiscall CImage_Impl::~CImage_Impl(void)" (??1CImage_Impl@@UAE@XZ)
My guess is that QtCreator needs some core libs of windows, but why all my other programs are working then. :? Why, hoo why only with Magick ??

Any help would be great . Thanks.
arsham
Posts: 1
Joined: 2011-05-12T10:31:32-07:00
Authentication code: 8675308

Re: ImageMagick and Qt Creator on Windows

Post by arsham »

Have you found a solution to this problem yet?
Post Reply