Linker error in 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
che1404
Posts: 12
Joined: 2014-11-04T02:39:27-07:00
Authentication code: 6789

Linker error in Windows

Post by che1404 »

Hi all,
We have a desktop/mobile application linking against ImageMagick on iOS and OSX. Now we are migrating the app to Windows. I have compiled a static ImageMagick build on windows, following the docs (I've used Visual Studio 2013 and ImageMagick-6.9.0), but when I try to link against the app, I get the following error:

Code: Select all

 ... error: LNK2019: unresolved external symbol __imp_AcquireExceptionInfo referenced in function ... 
... error: LNK2019: unresolved external symbol __imp_AcquireImageInfo referenced in function ...
... error: LNK2019: unresolved external symbol __imp_MagickCoreGenesis referenced in function ...
... error: LNK2019: unresolved external symbol __imp_ConvertImageCommand referenced in function ...
... error: LNK2019: unresolved external symbol __imp_MontageImageCommand referenced in function ...
 
I'm linking against all the generated static libraries:

Code: Select all

LIBS += -lCORE_DB_Magick++_ \
            -lCORE_DB_bzlib_ \
            -lCORE_DB_cairo_ \
            -lCORE_DB_coders_ \
            -lCORE_DB_croco_ \
            -lCORE_DB_ffi_ \
            -lCORE_DB_filters_ \
            -lCORE_DB_glib_ \
            -lCORE_DB_jbig_ \
            -lCORE_DB_jp2_ \
            -lCORE_DB_jpeg_ \
            -lCORE_DB_lcms_ \
            -lCORE_DB_librsvg_ \
            -lCORE_DB_libxml_ \
            -lCORE_DB_lqr_ \
            -lCORE_DB_magick_ \
            -lCORE_DB_openjpeg_ \
            -lCORE_DB_pango_ \
            -lCORE_DB_pixman_ \
            -lCORE_DB_png_ \
            -lCORE_DB_tiff_ \
            -lCORE_DB_ttf_ \
            -lCORE_DB_wand_ \
            -lCORE_DB_webp_ \
            -lCORE_DB_zlib_
Does anybody know in which library are defined the missing symbols (from the error)?

Thanks,
Robert.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Linker error in Windows

Post by magick »

Add MagickCore to your libs.
che1404
Posts: 12
Joined: 2014-11-04T02:39:27-07:00
Authentication code: 6789

Re: Linker error in Windows

Post by che1404 »

Hi,
thanks for the feedback. I cannot find any lib named MagickCore under the output "lib" folder (D:\lib\IMAGEMAGICK\ImageMagick-6.9.0\VisualMagick\lib). I only can find the list I put in my previous post.


Thanks,
Robert.
Post Reply