Page 1 of 1

Debug libs

Posted: 2009-06-11T02:30:15-07:00
by Nicola
Hello,

I started working with ImageMagick under VC++ and wonder where to get debug libs of the ImageMagick libs. I have a project working fine in release mode but throwing runtime exception in debug mode - probably because I link with the release versions of the libs.

Thanks in advance,
Nicola

P.S.: sorry for the multi-post

Re: Debug libs

Posted: 2009-06-11T05:46:37-07:00
by magick
You will need to compile ImageMagick from source yourself to create debug versions of the library. We already maintain 5 different releases of the Windows binaries and are not inclined to support any more.

Re: Debug libs

Posted: 2009-06-11T05:57:37-07:00
by Nicola
Hi,

thank you for your fast reply. I will see whether I can handle compiling debug versions by myself. Are there available any solutions/projects for VS 2005?

Re: Debug libs

Posted: 2009-06-11T09:44:30-07:00
by magick
Yes, grab the Windows source distribution from http://www.imagemagick.org/script/insta ... hp#windows.

Re: Debug libs

Posted: 2009-06-12T06:25:47-07:00
by Nicola
OK, I think building a debug version of the libs and linking those to my project worked fine. But I still get a runtime error when running my app in debug mode (running fine in release mode):
Microsoft C++ exception: Magick::ErrorMissingDelegate at memory location 0x0012cab4..

Do you have an idea why and/or how to fix this? I'd really like to debug my app...

Thank you for support till now and in advance ;-)

EDIT: The exception is thrown, when trying to init an Image object with a BMP:

Code: Select all

Magick::InitializeMagick( argv[0] );
Magick::Image cMagickImage( "black.bmp" );

Re: Debug libs

Posted: 2009-06-12T07:36:20-07:00
by magick

Re: Debug libs

Posted: 2009-06-12T08:00:32-07:00
by Nicola
Hi,

I'm not sure whether I understood everything, but I did the following:
1. Put all the XML files into the .exe directory
2. Added to the PATH-variable: ...\ImageMagick\VisualMagick\bin; ...ImageMagick\coders
3. Added an environment variable MAGICK_HOME with ...ImageMagick\coders

Unfortunately, nothing changed anything to the thrown exception.

Re: Debug libs

Posted: 2009-06-12T10:33:26-07:00
by magick
An easy solution is to put *.xml, *.exe, and *.dll all in the same folder. To determine where ImageMagick is looking for its configuration files and modules, type
  • convert -debug configure,module logo: logo.png

Re: Debug libs

Posted: 2009-06-15T03:10:30-07:00
by Nicola
magick wrote:An easy solution is to put *.xml, *.exe, and *.dll all in the same folder. To determine where ImageMagick is looking for its configuration files and modules, type
  • convert -debug configure,module logo: logo.png
I thought I've already done so, but obviously I missed something the first time. Now it works. Thank you very much!