Using VisualMagick

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
smitha

Using VisualMagick

Post by smitha »

How can we use magicwand on win32. I have created a sample .c / .cpp program as shown in the sample. THough it compiles successfully, I have some link errors.

Linking...
sample.obj : error LNK2001: unresolved external symbol _MagickWandTerminus
sample.obj : error LNK2001: unresolved external symbol _DestroyMagickWand
sample.obj : error LNK2001: unresolved external symbol _MagickWriteImages
sample.obj : error LNK2001: unresolved external symbol _MagickResizeImage
sample.obj : error LNK2001: unresolved external symbol _MagickNextImage
sample.obj : error LNK2001: unresolved external symbol _MagickResetIterator
sample.obj : error LNK2001: unresolved external symbol _MagickRelinquishMemory
sample.obj : error LNK2001: unresolved external symbol _MagickGetException
sample.obj : error LNK2001: unresolved external symbol _MagickReadImage
sample.obj : error LNK2001: unresolved external symbol _NewMagickWand
sample.obj : error LNK2001: unresolved external symbol _MagickWandGenesis
Debug/sample.exe : fatal error LNK1120: 11 unresolved externals


Any ideas on this??

Thanks a lot....
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Using VisualMagick

Post by el_supremo »

You need to point the linker at the .lib files.
If you're using Microsoft's compiler, in the project's properties for Linker|General set "Additional Library Directories" to the path to the lib directory in your IM distribution - mine is set to "C:\ImageMagick-6.3.7-2\VisualMagick\lib"
and in Linker|Input set the "Additional Dependencies" field to:
CORE_RL_wand_.lib CORE_RL_magick_.lib

Pete
smitha

Re: Using VisualMagick

Post by smitha »

Thanks Pete.

To a large exten this succeeded. I have another issue here :(

Though I have specified all the libs, it still gives me the following Link error -

CORE_DB_png_.lib(pngwutil.obj) : error LNK2001: unresolved external symbol __iob
CORE_DB_libxml_.lib(xmlmemory.obj) : error LNK2001: unresolved external symbol __iob
CORE_DB_libxml_.lib(debugXML.obj) : error LNK2001: unresolved external symbol __iob
CORE_DB_png_.lib(pngerror.obj) : error LNK2001: unresolved external symbol __iob
CORE_DB_png_.lib(pngrutil.obj) : error LNK2001: unresolved external symbol __iob
CORE_DB_libxml_.lib(parserInternals.obj) : error LNK2001: unresolved external sy
mbol __iob
CORE_DB_libxml_.lib(tree.obj) : error LNK2001: unresolved external symbol __iob
CORE_DB_libxml_.lib(xmlIO.obj) : error LNK2001: unresolved external symbol __iob
CORE_DB_libxml_.lib(error.obj) : error LNK2001: unresolved external symbol __iob

So I feel , I am missing something else here...

Any Ideas on this?

Regards
smitha
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Using VisualMagick

Post by el_supremo »

Sorry, I don't know how to fix that.

Pete
Post Reply