Unable to Link Static Imagemagick Library on Mac

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
arunvirsingh
Posts: 1
Joined: 2014-01-05T21:10:41-07:00
Authentication code: 6789

Unable to Link Static Imagemagick Library on Mac

Post 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.
Koen
Posts: 4
Joined: 2014-01-28T06:29:36-07:00
Authentication code: 6789

Re: Unable to Link Static Imagemagick Library on Mac

Post by Koen »

Why don't you post the linking errors here?
Post Reply