Page 1 of 1

Using VisualMagick

Posted: 2008-02-12T01:17:04-07:00
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....

Re: Using VisualMagick

Posted: 2008-02-12T09:37:47-07:00
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

Re: Using VisualMagick

Posted: 2008-02-18T03:27:01-07:00
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

Re: Using VisualMagick

Posted: 2008-02-18T10:10:26-07:00
by el_supremo
Sorry, I don't know how to fix that.

Pete