Making it easier to use ImageMagick libraries on Windows

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
DanKegel
Posts: 11
Joined: 2013-06-06T11:04:20-07:00
Authentication code: 6789

Making it easier to use ImageMagick libraries on Windows

Post 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?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Making it easier to use ImageMagick libraries on Windows

Post 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.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Making it easier to use ImageMagick libraries on Windows

Post by dlemstra »

Did you receive a patch for this?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Making it easier to use ImageMagick libraries on Windows

Post by magick »

Not that we can recall.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Making it easier to use ImageMagick libraries on Windows

Post 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"
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply