Page 1 of 1

Linking ImageMagick statically on windows?

Posted: 2010-02-02T16:57:37-07:00
by smcallis
I'm trying to link ImageMagick into a dll I'm making on windows, and I'm having a heck of a problem getting it to work right. Basically I'm using the Image() class in Magic++ to enable me to load an image from a URL and display it, nothing fancy. So I'm linking in the Magick++ and magick libraries, but I keep getting unresolved symbol errors:
Error 3 error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Magick::Image::~Image(void)" (__imp_??1Image@Magick@@UAE@XZ)
Etc, etc, for ~Image(void), Image::operator=, Image(string) and Image(void). I've used dumpbin on the Magick++ lib file to make sure the symbols are indeed there, but to no avail. Can anyone who's done this shed some light?

Re: Linking ImageMagick statically on windows?

Posted: 2010-02-02T17:14:31-07:00
by magick
Go to c:\Program Files\ImageMagick-6.5.9-1-Q16\Magick_Demos and click on the button workspace. Build and execute. It should compile, link, and run without complaint. Now use this workspace as a template for your own project.

Re: Linking ImageMagick statically on windows?

Posted: 2010-02-02T17:17:33-07:00
by smcallis
Which package should I install specifically to get that? I have a source package that doesn't seem to have Magick_Demo

Re: Linking ImageMagick statically on windows?

Posted: 2010-02-02T17:57:17-07:00
by magick
The Button workspace should be part of the Windows source distribution, however, it definitely is part of the Windows static binary distribution @ http://magick.imagemagick.org/script/bi ... hp#windows.

Re: Linking ImageMagick statically on windows?

Posted: 2010-02-02T18:00:53-07:00
by smcallis
ImageMagick-6.5.9-1-Q16-windows-static.exe is what I was installing, but the only folders I see in C:\Program Files\ImageMagick-6.5.9-Q16 are "images", "uninstall" and "www", along with several .exe and .dll files. Nothing else...

Re: Linking ImageMagick statically on windows?

Posted: 2010-02-02T20:02:03-07:00
by smcallis
Any thoughts anyone?

Re: Linking ImageMagick statically on windows?

Posted: 2010-02-15T02:38:23-07:00
by davedowns
Try installing using the DLL installer, that gave me the option to install the C/C++ headers and libraries and included the static as well as dynamic versions.