Page 1 of 1

Unable to Link Static Imagemagick Library on Mac

Posted: 2014-01-06T01:56:48-07:00
by arunvirsingh
Hi
I downloaded Imagemagick library on my machine Mac OS X Lion 10.7.5.
I configured the library for build as below:-
./configure --enable-shared=no --enable-static=yes.

libMagick++-6.Q16.a, libMagickCore-6.Q16.a and libMagickWand-6.Q16.a were created in /usr/local/lib and header files for Imagemagick were also installed.

But when I try to use library as

Code: Select all

#include <Magick++.h> 
#include <iostream> 
using namespace std; 
using namespace Magick;

int main (int argc, char * const argv[])
{   
	
	
	Image master("horse.gif"); 
	Image second = master; 
	second.resize("100x100"); 
	Image third = master; 
	third.resize("150x150"); 
	second.write("horse100x100.gif"); 
	third.write("horse150x150.gif");
	return 0; 
}
it gives linking errors.

The same code works fine if I create dylibs (shared libraries also).
But I need to link statically.
Please help me.

Re: Unable to Link Static Imagemagick Library on Mac

Posted: 2014-01-28T06:33:50-07:00
by Koen
Why don't you post the linking errors here?