I've not come across this problem on any forum so I decided to post.
I'm using the Image Magick library with the Magick++ interface for a c++ Image Classification project.
I'm working on Mac OSX 10.6.2, compiling in unix using a Makefile and the standard:
`Magick++-config --cppflags --cxxflags --ldflags --libs` to link to Magick++.
I use the ImageMagick distribution provided by macports.
I have no problem compiling and running code that calls the Magick++ library.
Code: Select all
Image image = new Image(pic.jpg);
image.wave();
image.write("wave_pic.jpg");
However a problem occurs when I attempt to convert the image to grayscale like this:
Code: Select all
Image image = new Image(pic.jpg);
image.type(Magick::GrayscaleType);
image.write("gray_pic.jpg");
Code: Select all
Undefined symbols:
"Magick::Image::type(MagickLib::ImageType)", referenced from:
_main in main.o
ld: symbol(s) not found
It appears that the method Image::type(MagickLib::ImageType) that is declared in the header isn't present in my version of libMagick++ libMagickWand or libMagickCore.
Is this a known issue? Where should I look to fix it?
Thanks in advance for any insights.
- Morris