Page 1 of 1

Making it easier to use ImageMagick libraries on Windows

Posted: 2013-06-06T13:10:53-07:00
by DanKegel
In viewtopic.php?f=1&t=8577
a user talked about confusion when trying to use the ImageMagick API
in Visual C++.
The standard answer he was given was "Just copy the project files from the demo directory",
but IMHO ImageMagick could do better than that.

Boost, for instance, provides very clear instructions
http://www.boost.org/doc/libs/1_46_0/mo ... st-library

Part of what makes life easier for casual Boost users is that their headers include pragmas like this:

#ifndef IMAGEMAGICK_NOAUTOLINK
#if DEBUG
#pragma comment(lib, "Core_DB_magick_.lib"
#else
#pragma comment(lib, "Core_RL_magick_.lib"
#endif
#endif

so users don't have to know or care what the individual libraries are named;
they only need to tell Visual C++ what directory they're in.

Would there be any interest in a patch adding this feature?

Re: Making it easier to use ImageMagick libraries on Windows

Posted: 2013-06-06T15:39:33-07:00
by magick
Post a URL to the patch. We'll test it and if it works, we'll include it in the next point release of ImageMagick. Thanks.

Re: Making it easier to use ImageMagick libraries on Windows

Posted: 2013-07-08T13:51:17-07:00
by dlemstra
Did you receive a patch for this?

Re: Making it easier to use ImageMagick libraries on Windows

Posted: 2013-07-09T03:29:42-07:00
by magick
Not that we can recall.

Re: Making it easier to use ImageMagick libraries on Windows

Posted: 2013-07-09T04:20:20-07:00
by dlemstra
I will submit one later this week.

EDIT:

Patches have been applied. You should define STATIC_MAGICK to enable this:

Code: Select all

#define STATIC_MAGICK
#include "Magick++.h"
When you are using STATIC_MAGICK and don't want auto linking magick you should define NOAUTOLINK_MAGICK

Code: Select all

#define STATIC_MAGICK
#define NOAUTOLINK_MAGICK
#include "Magick++.h"