Page 1 of 1
Confused about missing delegates and static MT libraries
Posted: 2008-09-10T14:00:58-07:00
by vtagle-qsi
Can someone shed some light on this situation? I'm using the static multi-threaded libraries for Magick++ which from what I can understand, lets you link in all that you need statically so that you don't need the DLL modules. However, when I execute the following line of code:
Code: Select all
Magick::Image svgImage("test.png");
a Missing Delegate exception gets thrown. Is there something more I have to do such as putting additional files next to my executable? Putting the XML config files didn't seem to help matters, either.
Re: Confused about missing delegates and static MT libraries
Posted: 2008-09-10T15:39:28-07:00
by fmw42
If you installed from source, you will need to install any delegate library you want for various image formats: jpg, tiff, png, etc
To check your delegates:
convert -list configure
Then look at the line that starts with DELEGATES.
The libraries can be found at
http://www.imagemagick.org/download/delegates/
you will need to install any that you want to use.
Re: Confused about missing delegates and static MT libraries
Posted: 2008-09-10T15:59:29-07:00
by vtagle-qsi
Okay. But I thought the purpose of building the static libraries was that so you could create a portable version of IM that you could link into an application and then run that application on another machine without having to have IM installed on that machine. Or am I misunderstanding the purpose of building the static multi-threaded libraries? Should I be asking this question in the MagickWand forum?
These are the libraries I'm linking into my application (for the debug version, at least):
CORE_DB_jpeg_.lib CORE_DB_lcms_.lib CORE_DB_libxml_.lib CORE_DB_magick_.lib CORE_DB_Magick++_.lib CORE_DB_png_.lib CORE_DB_tiff_.lib CORE_DB_ttf_.lib CORE_DB_wand_.lib CORE_DB_wmf_.lib CORE_DB_zlib_.lib
CORE_DB_png_.lib is already in there so I assume that's what I need to handle PNG file so this is why I'm confused about the missing delegate exception.
Re: Confused about missing delegates and static MT libraries
Posted: 2008-09-10T16:05:31-07:00
by magick
Download and install the ImageMagick Windows static distribution. Go to the c:\Program Files\ImageMagick-6.4.3-Q16\Magick++_demos folder. Click on the button workspace and build and run. Does this workspace run ok? If so, use the button workspace as a template for your own project.
Re: Confused about missing delegates and static MT libraries
Posted: 2008-09-10T16:32:44-07:00
by vtagle-qsi
Okay. I've done this and made some changes to the source for the button demo to do what I need so I'll attempt to use this project as my template. I assume it's using the Dynamic Multi-threaded DLL runtimes build option. However, my initial question really isn't being answered here. I'm just trying to figure out if how I understand the different build options work are correct. Really, I just want to know if the Static Multi-threaded runtimes build option is supposed to do what I think it does which is to allow an application to link to statically link to IM and get everything it needs to do and if it doesn't what else do I need to do to make it work. Being told to install delegates (which appears to be good advice if I'm using the command-line programs but I'm not) or to just use the demo projects as a starting point (again, not bad advice) doesn't really help my understanding of how IM is supposed to work. I'm not trying to offend here, I'm just trying to get some straight answers to the questions I've been asking.
Re: Confused about missing delegates and static MT libraries
Posted: 2008-09-10T17:55:14-07:00
by magick
Have you read
http://www.imagemagick.org/script/advan ... lation.php? It discusses the different ImageMagick builds under Windows. The static build includes all the standard delegate libraries such as JPEG and PNG and does not include any DLL's. The demo workspace is recommended as a starting point for linking all the required static libraries. For the smallest footprint for your application, you can bundle your application and all the static ImageMagick libraries and configuration files into one folder. ImageMagick will look for its dependencies in the same folder as your application (e.g. color.xml, delegate.xml, etc).
Re: Confused about missing delegates and static MT libraries
Posted: 2008-09-10T19:30:50-07:00
by vtagle-qsi
Okay, using the workspaces of the static MT demos, I was able to get IM working in my project. Thanks for all the help, everyone.
Re: Confused about missing delegates and static MT libraries
Posted: 2010-06-16T01:08:36-07:00
by hakiim35
Hello, I have been suffering from the same problem.
First I build the libraries exactly as it is told in
http://www.imagemagick.org/script/insta ... hp#windows under the heading
Install from Windows Source
Then, I link all the produced libraries into my application but I get many linkage errors.
As the solution offered by "magick", I installed the newest static versions 6.6.2-5-Q16 and Q8 but none of them includes a "Magick++_demos" directory.
I have also searched for the older ImageMagick-6.4.3-Q16 version on the net but I could't find.
Would anyone help me about the proper settings for the project?
thanks.
Re: Confused about missing delegates and static MT libraries
Posted: 2010-06-16T04:09:38-07:00
by Drarakel
hakiim35 wrote:I have also searched for the older ImageMagick-6.4.3-Q16 version on the net but I could't find.
See e.g.
here. (But I don't think that this solves the problem.)
Re: Confused about missing delegates and static MT libraries
Posted: 2010-06-16T06:30:02-07:00
by hakiim35
Thank you.
I have just installed it but it does not include a Magick++_demos directory inside..