Page 1 of 1

Problem using Magick++ over Ubuntu 10.04

Posted: 2010-10-11T03:13:00-07:00
by memmaker650
I'm newbie using ImageMagick.

I installed ImageMagick library from source into Ubuntu 10.04. Installation went fine and all the files are in usr/local/

Afeter installing the library i'm trying the first examples of Magick++ to know how it works.

First examples- Open an image
#include <Magick++.h>
#include <iostream>

using namespace std;
using namespace Magick;

int main(int argc,char **argv)
{
//Create an instance of the class
Image master;

//Read the inputfile
master.read(argv[1]);

//Display image
master.display();

//Write the file to a different format
master.write(argv[2]);

return 0;
}

When i try to compile this example with this command
g++ first.cpp -o first `Magick++-config --cppflags --cxxflags --ldflags --libs`

obtain no error messages. BUt when I execute the program system launch the following message:

error while loading shared libraries: libMagick++.so.4: cannot open shared object file: No such file or directory

What happen ???? or what i'm doing wrong ???

Thanks in advance