Using ImageMagick with a 32-bit Qt/C++ app built on Windows 10 using MinGW

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
smoyer
Posts: 1
Joined: 2018-04-30T06:53:10-07:00
Authentication code: 1152

Using ImageMagick with a 32-bit Qt/C++ app built on Windows 10 using MinGW

Post by smoyer »

I have a 32-bit Qt/C++ app built on Windows 10 using the MinGW compiler, and I want to start using ImageMagick APIs with this app.

I tried to use the ImageMagick-7.0.7-29-Q16-x86-dll.exe Windows binary release and discovered that dlls built with MSVC are not compatible with MInGW binaries.

I then downloaded the ImageMagick-i686-pc-mingw32.tar.gz binary release listed under Unix Binary Releases and am getting unresolved reference errors:

Code: Select all

debug/cc_imagechunks.o: In function ZN14CC_ImageChunks21initializeImageMagickEv': C:\Workspace\Qt\ImgAnnotation\build-cc_imagechunks-Desktop_Qt_5_8_0_MinGW_32bit-Debug/../CC_ImageChunks/SAVE/cc_imagechunks.cpp:85: undefined reference toMagick::CoderInfo::nameabi:cxx11 const'
debug/cc_imagechunks.o: In function ZN14CC_ImageChunks12setImageTypeEv': C:\Workspace\Qt\ImgAnnotation\build-cc_imagechunks-Desktop_Qt_5_8_0_MinGW_32bit-Debug/../CC_ImageChunks/SAVE/cc_imagechunks.cpp:114: undefined reference toMagick::Image::ping(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
C:\Workspace\Qt\ImgAnnotation\build-cc_imagechunks-Desktop_Qt_5_8_0_MinGW_32bit-Debug/../CC_ImageChunks/SAVE/cc_imagechunks.cpp:130: undefined reference to Magick::Image::magick[abi:cxx11]() const' debug/cc_imagechunks.o: In functionZN14CC_ImageChunks14IMReadToOCVMatEv':
C:\Workspace\Qt\ImgAnnotation\build-cc_imagechunks-Desktop_Qt_5_8_0_MinGW_32bit-Debug/../CC_ImageChunks/SAVE/cc_imagechunks.cpp:144: undefined reference to Magick::Image::read(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' C:\Workspace\Qt\ImgAnnotation\build-cc_imagechunks-Desktop_Qt_5_8_0_MinGW_32bit-Debug/../CC_ImageChunks/SAVE/cc_imagechunks.cpp:160: undefined reference toMagick::Image::write(int, int, unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, MagickCore::StorageType, void*)'
debug/cc_imagechunks.o: In function ZN6Magick13coderInfoListINSt7__cxx114listINS_9CoderInfoESaIS3_EEEEEvPT_NS3_9MatchTypeES8_S8_': C:\Workspace\Qt\ImgAnnotation\build-cc_imagechunks-Desktop_Qt_5_8_0_MinGW_32bit-Debug/../ImageMagic-i686-pc-mingw32-6.8.5/include/ImageMagick-6/Magick++/STL.h:2080: undefined reference toMagick::CoderInfo::CoderInfo(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2.exe: error: ld returned 1 exit status
Any recommendations on how I can do what I want to do?

07:16:33: Elapsed time: 00:10.
Post Reply