Page 1 of 1

Linker error in Windows

Posted: 2014-11-17T03:03:39-07:00
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.

Re: Linker error in Windows

Posted: 2014-11-17T04:30:51-07:00
by magick
Add MagickCore to your libs.

Re: Linker error in Windows

Posted: 2014-11-17T23:25:56-07:00
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.